After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760058 - makes awt-gtk applications hang
makes awt-gtk applications hang
Status: RESOLVED FIXED
Product: java-atk-wrapper
Classification: Applications
Component: general
0.33.x
Other Linux
: Normal normal
: ---
Assigned To: java-atk-wrapper maintainer(s)
java-atk-wrapper maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-02 00:33 UTC by Samuel Thibault
Modified: 2019-05-01 21:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (java-atk-wrapper part) (5.36 KB, patch)
2016-01-02 00:33 UTC, Samuel Thibault
none Details | Review
proposed fix (atk-bridge part) (5.81 KB, patch)
2016-01-02 00:34 UTC, Samuel Thibault
none Details | Review

Description Samuel Thibault 2016-01-02 00:33:53 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.
Comment 1 Samuel Thibault 2016-01-02 00:34:48 UTC
Created attachment 318144 [details] [review]
proposed fix (atk-bridge part)
Comment 2 Samuel Thibault 2016-01-23 22:51:53 UTC
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
Comment 4 Samuel Thibault 2019-05-01 21:52:18 UTC
Fixed by 37a9a39986ac3ecb8717448980e99ccf4344c81c ('Use a separate context for delivering events')