Re: Opening dialogs outside the Gtk thread?



Dmitry Konyshev wrote:
> Have you already tried to attach to the hung process with gdb? You
> should be able to see in which point the process hangs.
>
> Aren't there another threads that update the GUI? Do they all have gtk
> functions calls protected with the lock?

Heh, I sort of figured out the problem:
After removing any calls to gdk_threads_enter/leave anymore, I fired up
gdb and watched the behaviour of the threads and which thread called
what. Everything looked fine. Just at some point after handling an
overwrite request, the program would deadlock. I looked at the call
stack and noticed it happening in gtk_main_loop where it would wait()
for some mutex to unlock, which was confusing since I nowhere explicitly
locked anything!
However, I noticed that I was still calling gdk_threads_init(), but I
didn't think it would do any harm. Obviously it did: After removing the
call, everything works just fine!

I'm not sure what exactly this function does, but it looks as if you
really shouldn't use it if you don't really need it.

Thanks for your patience and help,
Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]