GNOME Bugzilla – Bug 783381
Wrong introspection annotation for gtk_builder_add_callback_symbol
Last modified: 2018-05-02 18:32:51 UTC
Created attachment 353111 [details] [review] Patch improving the introspection data The "callback_symbol" argument to gtk_builder_add_callback_symbol is annotated as "(scope async)", but this is incorrect: it implies that the callback will only be called once, and that the bindings can free the wrapping code after the first invocation. But this is clearly not true, since the callback can be invoked more than once, which will then lead to crashes. A better annotation is "(scope notified)", which leads to a leak but no crash. An even better alternative would be to have a variant of "gtk_builder_add_callback_symbol" with a GDestroyNotify, so there is no leak. For the moment I simply attached a patch changing the annotation to scope notified to avoid the crash, since this introduces no new API.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/830.