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 751715 - assert() failure in meta_window_unmanage()
assert() failure in meta_window_unmanage()
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-30 12:07 UTC by Fabrice Bellet
Modified: 2015-12-10 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (2.89 KB, text/plain)
2015-06-30 12:07 UTC, Fabrice Bellet
  Details
stack: Don't try to focus hidden windows (1.22 KB, patch)
2015-06-30 13:13 UTC, Florian Müllner
committed Details | Review

Description Fabrice Bellet 2015-06-30 12:07:44 UTC
Created attachment 306392 [details]
backtrace

On Fedora 22, when destroying the FlightGear window from the window manager, it triggers and assert() failure in  meta_window_unmanage(). Here is the log obtained with MUTTER_DEBUG=1 MUTTER_VERBOSE=1 :

SYNC: 30718: Syncing to get 1 GetProperty replies in meta_prop_get_values
STARTUP: Window 0x2800003 (FlightGear) has _NET_WM_USER_TIME of 5741652
WINDOW_OPS: Doing grab op 4 on window 0x2800003 (FlightGear) button 1 pointer already grabbed: 0 pointer pos 2515,388
WINDOW_OPS: Grab op 4 on window 0x2800003 (FlightGear) successful
WINDOW_OPS: Ending grab op 4 at time 5741764
WINDOW_OPS: Deleting 0x2800003 (FlightGear) with delete_window request
FOCUS: Not unfocusing 0x2800003 (FlightGear) on delete/kill
VERBOSE: Updating prelit control from 2 to 2
WINDOW_STATE: Window 0x2800003 (FlightGear) withdrawn
VERBOSE: Unmanaging 0x2800003 (FlightGear)
GROUPS: Removing 0x2800003 (FlightGear) from group with leader 0x2800003
GROUPS: Destroying group with leader 0x2800003
FOCUS: Focusing default window since we're unmanaging 0x2800003 (FlightGear)
FOCUS: Focusing MRU window
FOCUS: Focusing workspace MRU window 0x2600a9e (FlightGear)
FOCUS: Setting input focus to window 0x2600a9e (FlightGear), input: 1 take_focus: 0
FOCUS: Window 0x2600a9e (FlightGear) is not showing, not focusing after all
Comment 1 Florian Müllner 2015-06-30 13:13:54 UTC
Created attachment 306402 [details] [review]
stack: Don't try to focus hidden windows

A window may be hidden even if not minimized itself, for instance
when an ancestor is minimized. As meta_window_focus() will refuse
to actually focus the window in that case, don't pick it in the first
place.


This patch addresses the reproducer in https://bugzilla.redhat.com/show_bug.cgi?id=1173700 - unfortunately the backtrace only shows the issue (failing to move the focus when the currently focused window is closed), but not the actual reason for the failure. However the log fragment suggests that this could indeed be the same issue, testing appreciated!
Comment 2 Florian Müllner 2015-06-30 13:14:51 UTC
Comment on attachment 306402 [details] [review]
stack: Don't try to focus hidden windows

Attachment 306402 [details] pushed as 6c05eb5 - stack: Don't try to focus hidden windows

Leaving open for now as of comment #1.
Comment 3 Fabrice Bellet 2015-06-30 14:22:50 UTC
The patch works for me! 

I can give more details about my setup, and I confirm that this is related to an ancestor window being minimized. I start FlightGear with the "fgrun" launcher (in fltk), and after the FlightGear window shows up, I iconify the fgrun windows. There're two windows belonging to fgrun, a main one for simulator's parameters, and a second one for the logs. So the crash is reproductible without the patch, (now knowing how to trigger it), and the patch fixes it. Thanks!
Comment 4 Olivier Fourdan 2015-12-10 12:47:59 UTC
attachment 306402 [details] [review] has been merged as commit 6c05eb58 but this bug is still opened.
Comment 5 Florian Müllner 2015-12-10 16:09:23 UTC
(In reply to Olivier Fourdan from comment #4)
> attachment 306402 [details] [review] [review] has been merged as commit 6c05eb58 but
> this bug is still opened.

That's because the assertion is quite generic and may be triggered by other code paths than the one that got fixed (as evidenced by bug 759297). Anyway, we have a new bug with a different reproducer, so let's get this one off the list ...