Re: problems with threads in a shared object

2006-08-10 Thread Luka Napotnik
Now there's a simular problem with the shared library. I have a function in the main program that uses mutextes. I call that function in the .so and compile the .so. But when I run the program it quits with an dlopen() error, that was not there before calling the mutex function. So the .so is not

Re: problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
Ok it works now. Seems there was a problem with the functions. On 8/8/06, Luka Napotnik <[EMAIL PROTECTED]> wrote: > > gdb: > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1218409552 (LWP 25125)] > 0xb7979e84 in pthread_mutex_lock () from > /lib/tls/i686/cmov/libpthr

Re: problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
gdb: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1218409552 (LWP 25125)] 0xb7979e84 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0 There's a plugin_register() function that initializes g_thread (the main program also init's it) and the mutex is also

Re: problems with threads in a shared object

2006-08-08 Thread Tristan Van Berkom
Luka Napotnik wrote: > I have a program that imports plugins via dlopen and dlsym(). In those > plugins I use functions like g_mutex_lock to lock a variable, declared in > the main program. But when getting to the mutex function the whole program > crashes. > The .so library is compiled with: > >

problems with threads in a shared object

2006-08-08 Thread Luka Napotnik
I have a program that imports plugins via dlopen and dlsym(). In those plugins I use functions like g_mutex_lock to lock a variable, declared in the main program. But when getting to the mutex function the whole program crashes. The .so library is compiled with: gcc -g -O0 -shared `pkg-config --li