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 761064 - Devhelp plugin crashes (SIGSEGV) builder when disabling it
Devhelp plugin crashes (SIGSEGV) builder when disabling it
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-24 22:41 UTC by Mario Sánchez Prada
Modified: 2016-01-25 00:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Full backtrace (23.49 KB, text/plain)
2016-01-24 22:41 UTC, Mario Sánchez Prada
  Details
Patch proposal (2.43 KB, patch)
2016-01-24 22:47 UTC, Mario Sánchez Prada
committed Details | Review

Description Mario Sánchez Prada 2016-01-24 22:41:09 UTC
Whenever I try to unload the devhelp extension I get builder crashing pretty badly with a segmentation fault with a partial backtrace like this:

  • #0 gtk_application_set_accels_for_action
    at gtkapplication.c line 1717
  • #1 gbp_devhelp_workbench_addin_unload
    at gbp-devhelp-workbench-addin.c line 123
  • #2 ide_workbench_addin_unload
    at ide-workbench-addin.c line 100
  • #3 ide_workbench_addin_removed
    at ide-workbench.c line 502

(see full backtrace attached)

The problem seems to be that gtk_application_set_accels_for_action() is being called with NULL as the last parameter instead of a NULL-terminated empty array, which is causing GtkApplication to have a hard time internally.
Comment 1 Mario Sánchez Prada 2016-01-24 22:41:31 UTC
Created attachment 319635 [details]
Full backtrace
Comment 2 Mario Sánchez Prada 2016-01-24 22:47:29 UTC
Created attachment 319636 [details] [review]
Patch proposal

Indeed, this fixes the crashes reliably for me (which makes sense after checking the code in gtkapplication.c), so I'm proposing the mentioned approach as a patch, not only for the devhelp extension, but also for the terminal one, which presents the same issue.

Please review, thanks!
Comment 3 Christian Hergert 2016-01-25 00:13:45 UTC
Review of attachment 319636 [details] [review]:

LGTM
Comment 4 Christian Hergert 2016-01-25 00:24:13 UTC
Thanks!