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

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

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: gcc -g

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

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

RE: problems with threads

2005-03-24 Thread Vlietstra, Joe (NSSD)
Renato Araujo [EMAIL PROTECTED] wrote: I create a aplication with gtkmm (C++) and the aplication start various threads and this threads interact with gtk and change the screen, but sometimes the aplication crash? what it is happening? Stian Skjelstad [EMAIL PROTECTED] responded: Read the

problems with threads

2005-03-23 Thread Renato Araujo
Hi guys, I have a big problem, I create a aplication with gtkmm (C++) and the aplication start various threads and this threads interact with gtk and change the screen, but sometimes the aplication crash? what it is happening? Renato ___ gtk-list

Re: problems with threads

2005-03-23 Thread stian
I create a aplication with gtkmm (C++) and the aplication start various threads and this threads interact with gtk and change the screen, but sometimes the aplication crash? what it is happening? Read the thread section of glib and gtk api-reference. It describes how and when to use