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 528787 - Crash on closing windows
Crash on closing windows
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: Iain's compositor
trunk
Other Linux
: Normal critical
: ---
Assigned To: Metacity compositor maintainers
Metacity compositor maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-18 17:48 UTC by Sven Arvidsson
Modified: 2008-05-19 00:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositor-seg.patch (616 bytes, patch)
2008-05-02 00:01 UTC, Ed Catmur
none Details | Review

Description Sven Arvidsson 2008-04-18 17:48:28 UTC
Lately I have been noticing quite a few crashes when I close windows. 

The easiest way to reproduce this is simply to open a text file in gedit, and close it from the window decoration, not from the file menu.

I'm using svn r3682.

Starting program: /usr/bin/metacity --replace
[Thread debugging using libthread_db enabled]
[New Thread 0xb747a720 (LWP 10170)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb747a720 (LWP 10170)]
0x0805d20e in meta_compositor_set_active_window (compositor=0x815f550, screen=0x8114b98, window=0x83561e8) at core/compositor.c:2769
2769	      old_focus = find_window_for_screen (screen, 

Thread 1 (Thread 0xb747a720 (LWP 10170))

  • #0 meta_compositor_set_active_window
    at core/compositor.c line 2769
  • #1 meta_window_notify_focus
    at core/window.c line 5209
  • #2 event_callback
    at core/display.c line 2088
  • #3 filter_func
    at ui/ui.c line 83
  • #4 gdk_event_apply_filters
    at /tmp/buildd/gtk+2.0-2.12.9/gdk/x11/gdkevents-x11.c line 345
  • #5 gdk_event_translate
    at /tmp/buildd/gtk+2.0-2.12.9/gdk/x11/gdkevents-x11.c line 896
  • #6 _gdk_events_queue
    at /tmp/buildd/gtk+2.0-2.12.9/gdk/x11/gdkevents-x11.c line 2285
  • #7 gdk_event_dispatch
    at /tmp/buildd/gtk+2.0-2.12.9/gdk/x11/gdkevents-x11.c line 2345
  • #8 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.16.3/glib/gmain.c line 2009
  • #9 g_main_context_iterate
    at /build/buildd/glib2.0-2.16.3/glib/gmain.c line 2642
  • #10 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.16.3/glib/gmain.c line 2850
  • #11 main
    at core/main.c line 479

Comment 1 Sven Arvidsson 2008-04-28 13:03:17 UTC
Closing gedit isn't a reliable way to reproduce this any longer. 

Instead it seems to happen every now and again when I close any window, how doesn't seem to matter.
Comment 2 Henrique C. Alves 2008-04-28 17:47:34 UTC
The crash happens frequently for me when rapidly closing a recent opened window from the decorator (gedit included). When I close it, the screen freezes and I need to restart metacity to get a functional X back. I'm unable to get a trace, but for the record I received this:

[freakcode@atena ~]$ metacity --replace
78c5eeb7-e94e-2c51-705a2e02-561ed883 is dumped
Terminado

Comment 3 Ed Catmur 2008-05-01 00:51:04 UTC
Same here; can trigger reliably by xkill'ing epiphany then reopening it (with lots of windows in the saved session).  Sample backtrace:

  • #0 meta_compositor_set_active_window
    at core/compositor.c line 2769
  • #1 meta_window_notify_focus
    at core/window.c line 5209
  • #2 event_callback
    at core/display.c line 2088
  • #3 filter_func
    at ui/ui.c line 83
  • #4 ??
    from /usr/lib/libgdk-x11-2.0.so.0
...

(gdb) p info->focus_window
$1 = (MetaWindow *) 0x825c018
(gdb) p info->focus_window->frame
$2 = (MetaFrame *) 0x6172745f
(gdb) p info->focus_window->frame->xwindow
Cannot access memory at address 0x61727463
(gdb) p (char *) info->focus_window
$3 = 0x825c018 "x�%\bing on error_trap_pop, traps = 1, roundtrip = 0\n"
Comment 4 Ed Catmur 2008-05-02 00:01:41 UTC
Created attachment 110254 [details] [review]
compositor-seg.patch

Possible patch.
Comment 5 iain 2008-05-02 00:22:08 UTC
I'm not at my metacity devel system for the next two weeks, but I'll take a look when I get back, but provisionally, that looks like a good patch
Comment 6 Henrique C. Alves 2008-05-03 03:05:29 UTC
I tried the patch against svn r3702, the crashes/freezes when closing windows (specially gedit windows, could reproduce everytime here) have gone away ;)
Comment 7 Sven Arvidsson 2008-05-03 15:10:04 UTC
I'm also using r3702, and I haven't seen any crashes since I applied the patch.
Comment 8 iain 2008-05-19 00:15:01 UTC
Ed, thanks. I've committed your patch to trunk, revision 3716