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 606796 - Calling Dialog's run() in a signal handler is blocking other threads from using GTK
Calling Dialog's run() in a signal handler is blocking other threads from usi...
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: GNOME
4.0.x
Other Linux
: Normal major
: ---
Assigned To: java-gnome bindings maintainers
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-13 00:12 UTC by Guillaume Mazoyer
Modified: 2012-09-02 12:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Copy of the thread dump (relevant part) (1.60 KB, text/plain)
2010-01-13 00:12 UTC, Guillaume Mazoyer
Details

Description Guillaume Mazoyer 2010-01-13 00:12:45 UTC
Created attachment 151297 [details]
Copy of the thread dump (relevant part)

When Dialog's run() is called from a signal hanlder other threads are blocked. It is not possible to use GTK or to make any another action.
Threads appear to be BLOCKED. Using Window's present() can a workaround.
Comment 1 Andrew Cowie 2010-01-13 00:37:28 UTC
Raised on the java-gnome-hackers mailing list so we can have a discussiona about it.

As we discussed on IRC, a workaround is to not use Dialog's run() and instead call Window's present() and then connect() to Dialog.Response. That way you won't be calling a nested main loops in a signal handler, but rather will just let the Dialog do it's think in the existing main thread.

If you can do those tests we discussed over the weekend to confirm the entry/leave behaviour, that'd really help. Is the nesting in fact > 1 when your other thread is being blocked?

AfC
Comment 2 Fabio Durán Verdugo 2010-04-05 21:37:59 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 3 Andrew Cowie 2010-08-09 22:45:02 UTC
This shouldn't have been closed, so re-openning. Maybe, Fabio, we could ask you to not close bugs opened by developers? if someone says NEEDINFO to another hacker it's because they need input. Thanks!

AfC
Comment 4 Guillaume Mazoyer 2011-01-18 13:03:01 UTC
We now have a patch that inform people that they should not use the run() method but use the workaround instead. I think that it's still need a fix because well it's still a ugly bug. Maybe we could try to fix that after the API break.
Comment 5 Andrew Cowie 2012-09-01 15:20:38 UTC
It appears Slashtime ran afoul of this when I ported it to use Application; switching to an idle callback appears to allow the AboutDialog to work without blocking the main loop.

AfC