Re: GTK+ app hang on win32



Dave Andruczyk wrote:

2. As my app is running, it uses glade to load various tabs into a global
gtk_notebook. after each glade file is processed, it tries to call
gtk_notebook_append_page() and under win32 this call HANGS indefinitely, task
manager reports 0% cpu usage, so it doesn't appear to be stuck in a race)
Looks like a deadlock.

NOTE regarding #2.  the tab loading is run from within a thread that is wrapped
by calls to gdk_threads_enter() and gdk_threads_leave().  This works flawlessly
on linux, freebsd and OS-X,  but hangs at the above location on windows (Win2k
SP4).  Is this a GTK+ bug in the gtk_notebook or glib itself on win32?
Search the bugzilla and the mailing list archives ("threads" is a good search keyword), and you'll see that gdk_threads_enter()/gdk_threads_leave() shouldn't be used on Windows to do GUI calls. Use g_idle_add() to do the work from the main thread.



Daniel K. O.




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