Python bindings SegFaults

This forum is about all development around libVLC.
WhatEver
New Cone
New Cone
Posts: 7
Joined: 12 Apr 2010 17:57

Python bindings SegFaults

Postby WhatEver » 12 Apr 2010 18:13

Hi,

I'm having troubles with python bindings.

Code: Select all

import vlc instance1=vlc.Instance() media1=instance1.media_new(sys.argv[1]) player1=instance1.media_player_new() player1.set_media(media1) player1.play() instance2=vlc.Instance() media2=instance2.media_new(sys.argv[2]) player2=instance2.media_player_new() player2.set_media(media2) player2.play()
Simple code like that will cause a segmentation fault.
I tried with one instance and 2 media players, it doesn't work either.
As long as I use only one media player, there is no problem.

Program versions :

Code: Select all

VLC 1.0.5 (self compiled) / 1.0.2 (ubuntu) Python 2.6.4 (ubuntu) GCC 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
I tried on an other computer, I couldn't reproduice it on a 32bit linux (same programs versions).

Can anyone tell me what i'm doing wrong and/or test it on an other computer / program versions and let me know if it works ?

Thanks.

OlivierAubert
Developer
Developer
Posts: 92
Joined: 08 Mar 2007 15:43

Re: Python bindings SegFaults

Postby OlivierAubert » 19 Apr 2010 18:39

Maybe something to do with having 2 instances. Try to use only 1 vlc.Instance, and get multiple MediaPlayer from it.

WhatEver
New Cone
New Cone
Posts: 7
Joined: 12 Apr 2010 17:57

Re: Python bindings SegFaults

Postby WhatEver » 02 Aug 2010 11:34

Sorry for delay,

I already tried with two MediaPlayer in one instance, the result is the same.

I recently tried with thooses versions :

Code: Select all

VLC 1.1.2 (self compiled) / 1.0.2 (ubuntu) Python 2.6.5 (ubuntu) gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
I took the actual version of generated vlc.py (git).

Results are the same.

vortexrotor
New Cone
New Cone
Posts: 2
Joined: 04 Jan 2010 02:24

Re: Python bindings SegFaults

Postby vortexrotor » 01 Sep 2010 19:20

BUMP...

I get the same thing. Any status on this? I am running Ubuntu Lucid with VLC 1.0.6.

My code is>>>

import vlc

vlc.libvlc_get_version()
Returns >>>>> '1.0.6 Goldeneye' which tells me it is working
i.audio_get_volume()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Instance' object has no attribute 'audio_get_volume'

OlivierAubert
Developer
Developer
Posts: 92
Joined: 08 Mar 2007 15:43

Re: Python bindings SegFaults

Postby OlivierAubert » 02 Sep 2010 10:36

There is no audio_get_volume() method in the vlc.Instance, it is defined in vlc.MediaPlayer. See http://www.advene.org/download/python-c ... index.html for the API documentation.

gok
New Cone
New Cone
Posts: 1
Joined: 05 Feb 2011 00:54

Re: Python bindings SegFaults

Postby gok » 05 Feb 2011 00:58

BUMP..

I get segmentation fault with the simplest code...

Code: Select all

import vlc ins = vlc.Instance() player = ins.media_player_new()
VLC 1.1.7
Python 2.6.6
Mac OS Snow Leopard

any ideas?

WhatEver
New Cone
New Cone
Posts: 7
Joined: 12 Apr 2010 17:57

Re: Python bindings SegFaults

Postby WhatEver » 26 Apr 2011 10:09

vlc bindings are just 'not working' on 64bits OS.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 85 guests