GNOME Bugzilla – Bug 760058
makes awt-gtk applications hang
Last modified: 2019-05-01 21:52:18 UTC
Created attachment 318143 [details] [review] proposed fix (java-atk-wrapper part) Hello, Most probably in relation with https://bugzilla.gnome.org/show_bug.cgi?id=754688 https://bugzilla.gnome.org/show_bug.cgi?id=754748 but also, lately we got this report: http://bugs.debian.org/809087 saying that using my patched openjdk which calls xinitthreads doesn't help. I have been digging a bit more, it seems that openjdk maintainers will definitely refuse to make it call xinitthreads, because it used to pose problems in the past. And anyway, java-atk-wrapper should not be triggering libxc calls in its own thread... unless some odd interaction with its main_context loop. I thus patched java-atk-wrapper into creating its own main_context for dispatching glib events. I also had to patch atk-bridge to make it use the same context. The result is that all my tests now succeed (eclipse, netbeans, freemind, arduino, ...) without having to make awt call xinithreads. Thinking about it, it makes sense: when the java application is using a gtk look&feel, it will be registering stuff in the default main_context, which will thus unexpectedly run within the thread started by java-atk-wrapper! Making java-atk-wrapper use its own glib main_context looks much safer, so that its operations get really isolated in its own thread without interfering with the rest of the application. I'm attaching the java-atk-wrapper patch, and will attach the atk-bridge patch. I believe we need this sort of change to make java-atk-wrapper usable in the wild, so that we can enable it by default on all systems.
Created attachment 318144 [details] [review] proposed fix (atk-bridge part)
Hello, So, how do you think about this fix proposal? I'd like to upload it to Debian to fix the regression we are seeing with the enabling of accessibility by default; I'd really like not to have to disable accessibility by default there again. I however can't afford uploading it since it adds atk_bridge_set_event_context to the atk-bridge API. Samuel
We are getting more and more reports about this: http://bugs.debian.org/808860 http://bugs.debain.org/813143 https://josm.openstreetmap.de/ticket/11920 https://josm.openstreetmap.de/ticket/12022 https://josm.openstreetmap.de/ticket/12057 https://josm.openstreetmap.de/ticket/12061 https://josm.openstreetmap.de/ticket/12062 https://josm.openstreetmap.de/ticket/12063 https://josm.openstreetmap.de/ticket/12126 https://josm.openstreetmap.de/ticket/12139 https://josm.openstreetmap.de/ticket/12332 https://josm.openstreetmap.de/ticket/12451 So that people can stop getting affected, and testing can continue, I have uploaded the proposed patch to Debian.
Fixed by 37a9a39986ac3ecb8717448980e99ccf4344c81c ('Use a separate context for delivering events')