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 765993 - segfault in ide_source_view_get_definition_on_mouse_over_cb
segfault in ide_source_view_get_definition_on_mouse_over_cb
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: libide
3.20.x
Other OpenBSD
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-04 15:41 UTC by Antoine Jacoutot
Modified: 2016-05-05 09:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source-view: keep a reference to word start and end marks (1.46 KB, patch)
2016-05-05 06:39 UTC, Christian Hergert
committed Details | Review

Description Antoine Jacoutot 2016-05-04 15:41:08 UTC
Hi.

I am able to easily crash gnome-builder 3.20.2 on OpenBSD/amd64 when selecting some text.
It's not 100% reproducible, but eventually after 5 minutes of using it, it will end up segfaulting with:

  • #0 g_type_check_instance_is_fundamentally_a
    from /usr/local/lib/libgobject-2.0.so.4200.3
  • #1 g_object_unref
    from /usr/local/lib/libgobject-2.0.so.4200.3
  • #2 ide_source_view_get_definition_on_mouse_over_cb
    from /usr/local/lib/gnome-builder/libide-1.0.so
  • #3 g_task_return_now
    from /usr/local/lib/libgio-2.0.so.4200.3
  • #4 complete_in_idle_cb
    from /usr/local/lib/libgio-2.0.so.4200.3
  • #5 g_main_context_dispatch
    from /usr/local/lib/libglib-2.0.so.4200.3
  • #6 g_main_context_iterate
    from /usr/local/lib/libglib-2.0.so.4200.3
  • #7 g_main_context_iteration
    from /usr/local/lib/libglib-2.0.so.4200.3
  • #8 g_application_run
    from /usr/local/lib/libgio-2.0.so.4200.3
  • #9 main
    from /usr/local/bin/gnome-builder


I can rebuild glib and gnome-builder with debug symbols if need be; unless the problem already looks obvious to you guys :-)
Thanks.
Comment 1 Christian Hergert 2016-05-05 06:39:50 UTC
Created attachment 327325 [details] [review]
source-view: keep a reference to word start and end marks

These are borrowed references when creating, we need to have our own
reference to them during the lifecycle of the asynchronous callback.
Comment 2 Christian Hergert 2016-05-05 06:40:52 UTC
Pretty confident this will fix it, but since I didn't see the issue (somewhat
timing related) it would be nice if you could verify.

I'll push to the 3.20 stable branch as well.

Attachment 327325 [details] pushed as 670f22f - source-view: keep a reference to word start and end marks
Comment 3 Antoine Jacoutot 2016-05-05 09:59:41 UTC
Hi Christian.

Yeah that seemed to have done the trick.
>10 minutes of usage without a crash \o/

Thank you very much.