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 645176 - Closing display causes segfault
Closing display causes segfault
Status: RESOLVED DUPLICATE of bug 85715
Product: gtk+
Classification: Platform
Component: Backend: X11
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 644812 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-03-18 19:12 UTC by Garrett Regier
Modified: 2014-01-25 02:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix closing default display (2.17 KB, patch)
2011-03-18 19:14 UTC, Garrett Regier
none Details | Review
Fix closing the default display v2 (3.49 KB, patch)
2011-03-19 16:38 UTC, Garrett Regier
needs-work Details | Review

Description Garrett Regier 2011-03-18 19:12:48 UTC
Closing the default display causes a segfault.
Comment 1 Garrett Regier 2011-03-18 19:14:20 UTC
Created attachment 183761 [details] [review]
Fix closing default display
Comment 2 Garrett Regier 2011-03-19 16:38:16 UTC
Created attachment 183797 [details] [review]
Fix closing the default display v2
Comment 3 Matthias Clasen 2011-03-21 14:03:42 UTC
Review of attachment 183797 [details] [review]:

::: gdk/gdkdisplay.c
@@ +137,3 @@
+  if (info->toplevel_under_pointer != NULL)
+    g_object_unref (info->toplevel_under_pointer);
+

This looks right, other places do check toplevel_under_pointer before using it.

::: gdk/x11/gdkdevicemanager-core-x11.c
@@ +124,1 @@
 

How can these be NULL ? that looks like a bug

::: gdk/x11/gdkdisplay-x11.c
@@ +1864,3 @@
+  if (display == NULL)
+    return;
+

This check should be in the caller, gdk_x11_display_manager_set_default_display

::: gdk/x11/gdkscreen-x11.c
@@ +208,3 @@
   G_OBJECT_CLASS (gdk_x11_screen_parent_class)->finalize (object);
+
+  x11_screen->xdisplay = NULL;

This looks wrong. If x11_screen->xdisplay is accessed in the parent class finalizer, that is a bug that needs fixing.
Comment 4 Matthias Clasen 2011-04-09 01:21:32 UTC
Committed the correct parts of this patch.
Comment 5 Matthias Clasen 2011-12-30 06:30:57 UTC
*** Bug 644812 has been marked as a duplicate of this bug. ***
Comment 6 Timothy Arceri 2013-10-09 06:55:43 UTC
Hi Garrett did the commit from Matthias fix the problem? Can this bug be closed?
Comment 7 Matthias Clasen 2014-01-25 02:19:47 UTC

*** This bug has been marked as a duplicate of bug 85715 ***