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 583870 - Hamster crashes mutter
Hamster crashes mutter
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other All
: Normal critical
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-26 09:44 UTC by Kirill
Modified: 2009-07-31 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to allow all standard _NET_WM_WINDOW_TYPE values to be used with managed windows (3.95 KB, patch)
2009-07-10 11:33 UTC, Tomas Frydrych
reviewed Details | Review

Description Kirill 2009-05-26 09:44:36 UTC
Steps to reproduce:
1. Run hamster
2. Add activity
3. Crash


Stack trace:
I get this output in console:

Bug in window manager: Set a type atom for 0x20000a4 (Hamster) that wasn't handled in recalc_window_type

Other information:
Comment 1 Tomas Frydrych 2009-06-03 09:04:13 UTC
Adding my original comment from the list: mutter does not crash, it aborts. I probably happens because a window type that Mutter expects to be used only for
override-redirect windows is being set for a normal window; this is
indeed a bug, as the EWMH only says that those properties are
*typically* used for OR windows. Fixing this will need care to ensure we
do not break handling of OR windows elsewhere in the codebase.
Comment 2 Tomas Frydrych 2009-07-10 11:33:27 UTC
Created attachment 138182 [details] [review]
Patch to allow all standard _NET_WM_WINDOW_TYPE values to be used with managed windows
Comment 3 Owen Taylor 2009-07-17 12:16:14 UTC
Patch looks basically right to me.

I wonder if that much code in the unrecognized case is really necessary - meta_window_update_net_wm_type() is already supposed to sanitize the window->type_atom field, so if we hit that code path recalc_window_type() and meta_window_update_net_wm_type() are out of sync.The old meta_bug() seems fine: if we hit something we don't recognize, it's a Mutter bug.

If you go with the more verbose and non-aborting approach, I'd I think there needs to be a:

  meta_error_trap_push (display);
  [...]
  meta_error_trap_pop (display, TRUE);

trap around the XGetAtomName - XGetAtomName fails with BadAtom if the atom isn't recognized by the server. I know that we temporarily have a big error trap pushed over all of Mutter, but I don't think we should be relying on that.
Comment 4 Tomas Frydrych 2009-07-31 18:14:04 UTC
Committed with addition of the error trap as a576f7a1ea98840dd3c83f011f78583c1437fba1.