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 793543 - Make sure atk objects exist while processing signals
Make sure atk objects exist while processing signals
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: 2018-02-17 17:36 UTC by Samuel Thibault
Modified: 2019-05-01 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (10.40 KB, text/x-vhdl)
2018-02-17 17:36 UTC, Samuel Thibault
Details

Description Samuel Thibault 2018-02-17 17:36:13 UTC
Created attachment 368480 [details]
proposed fix

The following backtrace was reported while running netbeans:

  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at ././glib/gtestutils.c line 2455
  • #4 g_hash_table_lookup_node
    at ././glib/ghash.c line 373
  • #5 g_hash_table_lookup
    at ././glib/ghash.c line 1147
  • #6 signal_emit_handler
    at AtkWrapper.c line 791

This is most probably because the object was getting freed while the signal was being processed, and thus the hash table was being destroyed. We thus need to keep a reference on the atk object while the signal is processed.

The attached patch does that, by adding a reference in alloc_callback_para, and releasing it in free_callback_para. However, since like explained in https://bugzilla.gnome.org/show_bug.cgi?id=766774 we have to avoid calling methods of applications objects, we can't afford unreferencing from the jaw thread. This patch thus makes it just queue the para struct to be freed, so it's all processed in the application when it makes the next accessibility call. This might actually fix other bugs (deleting a global ref on para->args might call a destructor).
Comment 1 Samuel Thibault 2019-05-01 22:16:40 UTC
Fixed by 355a91eaae8fb9f4d546ee7d1efc4aa527dfc322 ("Make sure atk objects exist while processing signals")