Tiling - Phantom windows after suspend/resume
Describe the bug
I have a secondary bug that I can't work around: When the computer resumes from suspend, all the windows are on the same workspace (this isn't fixed by the preserve-focus plugin but that's a different and less annoying issue).
When I resume from suspend, there is an additional tile that doesn't contain a window and there is no apparent way to remove it. The only fix I've found is to restart Wayfire or reload wayfire.ini and manually re-tile every single window.
To Reproduce Steps to reproduce the behavior:
- Enable plugin tile, set it to affect all windows by default
- Turn off the displays (either manually)
- The active workspace is given all the open windows + 1 phantom tile. It doesn't seem to happen 100% of the time, unfortunately.
I don't remember this happening in 0.7.2. I'll try to debug this further but as it doesn't happen consistently (and seems to happen more frequently if there are lots of windows open) it's hard to test. I am going to try reverting https://github.com/WayfireWM/wayfire/commit/66daa8d6ad2ac291c811d7c939bd907e9f8bdb21 as that looks like the only somewhat recent commit which might cause this kind of behaviour but as the bug is intermittent it will take a while to see if it has fixed it.
Hi,
it seems that there is a possible null pointer dereference in the tile plugin, and it may be the cause of this issue
can you try this fork https://github.com/AR-CADE/wayfire or apply this patch https://github.com/AR-CADE/wayfire/commit/8c270e8138135b250792ee4371b6cafe9024a126, to your current version
'will make a PR if it happen to work for you .
Does that still happen in recent wayfire versions?
Hi,
sorry I don't use the tile plugin enough to tell if the problem still appear,
but yes the possible null pointer dereference is still present in the main branch.
At line 195, there is in theory no guarantee that the result pointer will be initialized after the while loop...
but yes the possible null pointer dereference is still present in the main branch.
At line 195, there is in theory no guarantee that the
resultpointer will be initialized after the while loop...
The code has an invariant that it should only be called if the node exists as a child. Does this lead to an actual bug/crash? Otherwise, it should be fine as it is. There are tons of places in Wayfire where there are no such null checks, because the callers need to ensure it is safe to call the function.
The code has an invariant that it should only be called if the node exists as a child.
ah ok, i wasn't sure that why i said in theory
Does this lead to an actual bug/crash?
i use wayfire as my main compositor but don't use the tile plugin enough to tell, i just remember that i found this some time ago while reviewing the plugin in order to control it through IPC.
But since there were no responses and i wasn't 100% sure, i didn't do any PR at the time, so no problem for not add this patch :-)
i use wayfire as my main compositor but don't use the tile plugin enough to tell, i just remember that i found this some time ago while reviewing the plugin in order to control it through IPC.
But since there were no responses and i wasn't 100% sure, i didn't do any PR at the time, so no problem for not add this patch :-)
Ok :) I'll close this issue, if someone encounters this bug again please open a new issue with a stacktrace.
I haven't had this issue for months at least, happy for it to be closed. I'll open a new issue if I get it again