Metacity crashes when a child window is undocked and parent window is minimized
OS: Ubuntu 22.04, Metacity version: 3.44 (issue also confirmed in 3.37.1/3.36.1/3.38.0)
One of our customers encountered a Metacity crash when a docked QT window in their application is un-docked, and the owning parent window is minimized. The crash output for metacity is as follows:
test@ubuntu-2204:~$ metacity --replace
**
metacity:ERROR:core/window.c:1114:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
Bail out! metacity:ERROR:core/window.c:1114:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
Aborted (core dumped)
test@ubuntu-2204:~$ metacity --version
metacity 3.44.0
Copyright (C) 2001-2009 Havoc Pennington, Red Hat, Inc., and others
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The customer has also provided a minimal reproducer python code, which can be found in the attachment below:
Steps for reproducing the issue:
- Install gnome-session-flashback (metacity) and reproducer's dependencies
sudo apt install lightdm gnome-session-flashback pyside2-tools python3-pyside2.qtwidgets
- run python3 Untitled.py
- Undock one of the application's child windows
- Minimize main window