GNOME Bugzilla – Bug 423057
Multi-threaded hangs with window events
Last modified: 2008-01-28 05:34:18 UTC
Steps to reproduce: 1. Enable accessibility (export GTK_MODULES="gail:atk-bridge") 2. Run a program that makes GTK calls from multiple threads 3. Call gtk_widget_hide(), not from the GTK main thread (see attached testcase) Stack trace:
+ Trace 122404
Thread 2 (Thread -1211327600 (LWP 24835))
Other information: I have noticed two problems both relating to hangs on multi-threaded window events: - if gtk_widget_hide() is called on a window, but not from the gtk main thread (ie not in a callback), it will cause a hang. - if gtk_init() and gtk_main() are called from two different threads, then the window losing focus will cause a hang. I'll attach a testcases showing these two situations. The stacktrace above is for the former (hang on closing window), but they are very similar. This issue affects all graphical applications using GNU Classpath under Gnome.
Created attachment 85334 [details] Testcase for window hiding hang Clicking the button should cause a few lines to be printed to console, then the window closing an application exiting (this happens with accessibility off). With accessibility on, the application hangs after the button is pressed.
Created attachment 85335 [details] Testcase for window focus hang Simple hello world application (modified from the GTK tutorial); however with accessibility enabled, once the window loses focus it hangs and will not redraw or respond. It hangs in the same place as the last testcase. Note gtk_init() and gtk_main() are called from different threads (there is no documentation I'm aware of that says this is not allowed, and it works with accessibility turned off).
looks like bug #329454. Could you please try with latest atk, gail and at-spi?
With more recent versions (1.18.0) there's a warning that appears fairly frequently ("failure: no device event controller found") but no hangs. Thanks, didn't realise the packages I was using were that outdated and only searched open bugs before filing this one.
Here is the output (no more information - is there a way to tell it to be verbose??) [jdeslip@jdeslippe ~]$ gramps LPRDoc: Free true type fonts not found. Microsoft true type fonts not found. Using Gnome standard fonts. Non-ascii characters will appear garbled in the output. INSTALL Free true type fonts from http://www.nongnu.org/freefont/ [jdeslip@jdeslippe ~]$ gramps Test1.grdb LPRDoc: Free true type fonts not found. Microsoft true type fonts not found. Using Gnome standard fonts. Non-ascii characters will appear garbled in the output. INSTALL Free true type fonts from http://www.nongnu.org/freefont/ Trying to open: Test1.grdb ... Type: GRAMPS database Opened successfully! (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. (gramps.py:11846): atk-bridge-WARNING **: failure: no device event controller found. Killed ------------------- The atk-bridge warnings are nothing I think - they occur as I type each letter of the new childs name. After the child is created and I try to get back to the people list. The program just hangs and uses up 100% of my cpu. The "killed" occurs whenever I tell it to force quite. Let me know how I can produce more useful debugging info.
Oh crap. I typed all that in the wrong bug... Sorry. Please delete it.