Closed wisp3rwind closed 3 months ago
Tiling Assistant listens to a maximized/tiled window's workspace-changed
signal so that it can re-maximize/untile the window on the new workspace. Apparently that's where the issue happens. So I guess when you close the laptop a tiled/maximized window gets moved to a different workspace/monitor... or at least that's what's supposed to happen, if the crash didn't occur. Or are you expecting a different behavior.
I unfortunately can't reproduce it on my laptop that is connected to an external monitor. Can you reproduce it consistently? If so, does it require a specific window/app or something?
Maybe related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6731
[EDIT]
Meaning that it might just be a GNOME bug.
I unfortunately can't reproduce it on my laptop that is connected to an external monitor. Can you reproduce it consistently? If so, does it require a specific window/app or something?
(Un)Fortunately, I've seen this only the one time; so don't have a (somewhat) reliable reproducer.
Maybe related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6731
[EDIT]
Meaning that it might just be a GNOME bug.
The stacktrace looks quite different though (crash in mutter directly vs crash in JS). I'll open an issue on the GNOME Gitlab, too; maybe they have an idea. Presumably, even if there was a logic bug in Tiling assistant, that shouldn't result in gnome-shell crashes?
I get it consistently ever after i installed Tiling-Assistant, exactly when moving the mouse in the locked screen while then trying to re-login (not from standby, jurt screen blanked):
gnome-shell[1256292]: #1 56467f9fbfe8 i /home/user/.local/share/gnome-shell/extensions/tiling-assistant@lele>
gnome-shell[1256292]: #0 56467f9fc0d8 i /home/user/.local/share/gnome-shell/extensions/tiling-assistant@lele>
gnome-shell[1256292]: == Stack trace for context 0x56467d844980 ==
gnome-shell[1256292]: Bail out! libmutter:ERROR:../src/core/window.c:5779:meta_window_get_work_area_for_logical_moni>
gnome-shell[1256292]: libmutter:ERROR:../src/core/window.c:5779:meta_window_get_work_area_for_logical_monitor: asser>
gnome-shell[1256292]: **
How can i help?
I cannot reproduce it anymore after reboot. In my case it may have been that i didn't reboot OS after pgrade.
It just happened again :-( I'm losing my work, just less frequently.
My best guess as an interim solution: Can you comment out these 2 lines
in ~/.local/share/gnome-shell/extensions/tiling-assistant@leleat-on-github/extension.js
. Re-load GNOME Shell after you've done so.
Note that the 'tiling states' of windows won't be saved after the screen is locked anymore. The windows will only look tiled but are considered floating.
Some days now, and more than 3 times i have logged in without wayland crashing, and without observing any side-effects. Truth is, it's hard to remember window state after casually unlocking screen-saver.
Regarding the root cause, my guess is my 2 monitors and the asymetrical use of workspaces on them, but it's a wild one.
Please consider merging this as is, or as an option for those who suffer like me :-)
Some days now, and more than 3 times i have logged in without wayland crashing, and without observing any side-effects. Truth is, it's hard to remember window state after casually unlocking screen-saver.
Regarding the root cause, my guess is my 2 monitors and the asymetrical use of workspaces on them, but it's a wild one.
Please consider merging this as is, or as an option for those who suffer like me :-)
I am currently in my last semester, so I don't have much time ATM. Will be able to work on T-A again in a few weeks. I have an idea for a fix. That said, can you confirm that the workaround works? I could make a new release with just the workaround...
can you confirm that the workaround works?
Yes, it works. But it's not the whole story.
Today i had a crash without re-logging-in from a lock-screen:
Feb 13 08:38:49 gnome-shell[2332392]: #2 7ffcf40a5170 b /home/user/.local/share/gnome-shell/extensions/tiling-assistant@leleat-on-github/src/extension/activeWindowHint.js:302 (2be4b0a99920 @ 12)
Feb 13 08:38:49 gnome-shell[2332392]: #1 7ffcf40a4a70 b /home/user/.local/share/gnome-shell/extensions/tiling-assistant@leleat-on-github/src/extension/activeWindowHint.js:306 (2be4b0a998d0 @ 375)
Feb 13 08:38:49 gnome-shell[2332392]: #0 7ffcf40a4950 b /home/user/.local/share/gnome-shell/extensions/tiling-assistant@leleat-on-github/src/extension/tilingWindowManager.js:104 (2be4b0a87290 @ 78)
Feb 13 08:38:49 gnome-shell[2332392]: == Stack trace for context 0x55768758ff70 ==
Feb 13 08:38:49 gnome-shell[2332392]: Bail out! libmutter:ERROR:../src/core/window.c:5778:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
Feb 13 08:38:49 gnome-shell[2332392]: libmutter:ERROR:../src/core/window.c:5778:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
Feb 13 08:38:49 gnome-shell[2332392]: **
Feb 13 08:38:49 gnome-shell[2332392]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
I confirm that now this last point i reported above crashes 3-4 times a day when i come back before the screen has been locked but it has dimmed,
I'd appreciate if you can suggest me another hot-fix.
@ankostis Can you open a new issue with some more information since it isn't related to the lockscreen (e. g. how do you trigger it, does it require specific windows or using specific features of Tiling Assistant).
That said, that JS stack trace points to the 'active window hint' triggering the crash (somehow). So you can disable it in the preference window of Tiling Assistant.
That won't fly for me, the active window hint has become by now a significant motivation for using the extension.
And after discovering the code in activeWindowHint.js:306
(due to this error) i removed the is-maximized exception for the hint, and now the hint is also helping me in case both my monitors contain maximized windows.
I don't know if it is related, but since then i didn't have any crash (the last 3 days). For sure the bug is in mutter, and maybe happens in the is-maximized check, not in the is-full-screen.
Anyhow, i think i will open x2 new issues, one for the crash you suggested and another one asking for hint-on-maximized windows.
Ubuntu is tracking the same crash in LP#2050865 but it's not very obvious because there seems to be a secondary issue whereby libmutter:ERROR
and later messages often don't get written to the log before dumping core. And there's a third issue whereby Ubuntu 24.04 isn't reporting reliable crash reports yet.
Also the upstream bug was https://gitlab.gnome.org/GNOME/mutter/-/issues/3402
I don't know enough about mutter to determine the cause of this but I have merged a PR that should fix this. So the next release of Tiling Assistant should no longer crash with this... because Tiling Assistant will no longer call any Meta.Window
methods to save the tiling state when the screen gets un/locked. Instead the state will now be saved in a variable after each un/tiling operation. When the screen gets locked Tiling Assistant will write the saved states variable to a file and reads from the file on a screen unlock.
Describe the bug gnome-shell crashes when closing the laptop's lid while connected to two external monitors via a dock. Reporting this here rather than for gnome-shell/mutter, since the extension is topmost in the stacktrace.
Steps To Reproduce see above (this is the first time this happened to me, so it's possible that a specific layout of windows/overview being open/etc might be required)
System Info:
main
branch...): 41, from EGOJournalctl logs