[vlc-devel] Re: Trouble writing vout plugin

Florian G. Pflug fgp at phlo.org
Tue Nov 11 15:20:33 CET 2003


On Sat, Nov 08, 2003 at 05:32:36PM +0100, Andreas Korth wrote:
> The plugin uses OpenGL by setting up an XWindow with a GLX drawing context 
> during plugin initialization. This works fine. The problem occurs in the 
> "Display" method when I try to swap the GLX buffers using: 
>  
>  glXSwapBuffers( p_vout->p_sys->p_display, p_vout->p_sys->win ); 
>  
> where 'win' is the X-Window and 'p_display' the respective X-Display. 
>  
> VLC will SIGSEGV 11 when the call is made from the "Display" function. The 
> same call executes happily when issued during initialization. 
>  
> Any ideas what's going wrong? 
>  
> Here's the backtrace information for the interested: 
>  
> [New Thread 16384 (LWP 537)] 
> [New Thread 32769 (LWP 538)] 
> [New Thread 16386 (LWP 539)] 
> [New Thread 32771 (LWP 540)] 
> [New Thread 49156 (LWP 541)] 
> [New Thread 65541 (LWP 542)] 
> 0x40042aa6 in waitpid () from /lib/libpthread.so.0 
> #0  0x40042aa6 in waitpid () from /lib/libpthread.so.0 
> #1  0x41d4eebc in KCrash::defaultCrashHandler(int) () 
>    from /usr/lib/libkdecore.so.4 

Hi

Looks like some library is used from two different threads, but is not
thread safe. I looks like you are using the KDE Interface plugin (because of
the KCrash-handle kicking in). You could try using the "dummy" Interface -
or some other Interface that doesn't use X11.

I don't know how this is handled in the xv and x11 output plugins. I guess
they open their own connection to the XServer...
How do you create the OpenGL-Window? If you use GLUT, then maybe GLUT uses
the same X11-Connection already used by the Interface, and this gives you
nasty raceconditions...

Hoping I could help...
greetings, Florian Pflug

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list