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 453022 - metacity crashed with signal 5 in g_logv()
metacity crashed with signal 5 in g_logv()
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.19.x
Other Linux
: Normal critical
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2007-07-02 07:34 UTC by Sebastien Bacher
Modified: 2008-07-13 04:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Sebastien Bacher 2007-07-02 07:34:40 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/123451

"Binary package hint: metacity

I was using openoffice writer, opened the save as dialog, closed it, pressed the close window (X) button.

ProblemType: Crash
Architecture: i386
Date: Sun Jul 1 18:44:09 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/metacity
NonfreeKernelModules: cdrom
Package: metacity 1:2.19.21-0ubuntu1
...
.

Thread 1 (process 5467)

  • #0 IA__g_logv
  • #1 IA__g_log
  • #2 IA__g_assert_warning
    at /build/buildd/glib2.0-2.13.5/glib/gmessages.c line 552
  • #3 meta_window_get_group
    at group.c line 112
  • #4 meta_window_same_application
    at window.c line 7448
  • #5 meta_window_configure_request
    at window.c line 4529
  • #6 event_callback
    at display.c line 2118
  • #7 filter_func
    at ui.c line 85
  • #8 gdk_event_apply_filters
    at /build/buildd/gtk+2.0-2.11.4/gdk/x11/gdkevents-x11.c line 344
  • #9 gdk_event_translate
    at /build/buildd/gtk+2.0-2.11.4/gdk/x11/gdkevents-x11.c line 895
  • #10 _gdk_events_queue
    at /build/buildd/gtk+2.0-2.11.4/gdk/x11/gdkevents-x11.c line 2283
  • #11 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.11.4/gdk/x11/gdkevents-x11.c line 2343
  • #12 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.13.5/glib/gmain.c line 2061
  • #13 g_main_context_iterate
    at /build/buildd/glib2.0-2.13.5/glib/gmain.c line 2694
  • #14 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.13.5/glib/gmain.c line 2898
  • #15 main
    at main.c line 391
  • #16 ??
  • #17 ??
  • #18 ??
  • #19 ??
  • #20 ??
  • #21 ??

Comment 1 Thomas Thurman 2007-07-02 12:15:20 UTC
So what happened here was:

* Something, presumably, OpenOffice, attempted to do a ConfigureRequest.
* ("disable workarounds" was on and "raise on click" was off)
* We have a policy of ignoring ConfigureRequests when they are older than the most recent timestamp on the active window, *AND* they are for a window which isn't the same application/"group" as the active window.
* We therefore need to find out the group of both the active and requested windows (using meta_window_same_application()).
* One of these had a null group. meta_window_get_group() will die on assertion failure if the window in question has a null group.

So the possible solutions are:

1) Make meta_window_same_application() check whether either or both have NULL groups, and act accordingly;
2) Remove the check for null groups in meta_window_get_group(). The check means that MWGG cannot return null, but amusingly, in most of the places where MWGG is called, we actually do check the result against null. The extra check was added by readams in r1236 back in 2003 "to ensure robustness":

http://svn.gnome.org/viewcvs/metacity?view=revision&revision=1236

I think this assertion is unnecessary and in fact causes errors. MWGG used to call meta_window_compute_group() instead, which is now only called on window creation or if the group leader changes. Is that enough? I mean, I hope it is, because it's currently all we do. If I remove the assertion but don't attempt to re-calculate the group if I find that window->group is null, I'm thinking that that's because there's no group rather than because we just didn't know it. If there *had* been a group, we would have known about it on window creation or on group leader changing.

So what I'll do, unless anyone complains or has a better idea, is simply get rid of the assertion in meta_window_get_group().
Comment 2 Elijah Newren 2007-07-03 01:11:19 UTC
Sounds good to me.  :-)

[I guess it does leave one corner-case where two windows don't have a group; in such a case, they probably should not be considered part of the same application despite both being in the "NULL" group, but that would only happen if both the configure-request'ed window and the active window were being withdrawn, right?  I can't think of a reason why we'd care about this case, though if we wanted to be paranoid we could check for it in meta_window_same_application]
Comment 3 Thomas Thurman 2008-07-13 04:08:16 UTC
Good idea.  Fixed.

http://svn.gnome.org/viewvc/metacity?view=revision&revision=3785