On teardown of plasmashell the shared pointer with shadows is unref'd quite late at which point QX11Info::connection() already return null, leading to a crash in those xcb calls.
The old code in Plasma PanelShadows checked for QX11Info::display() being null, which is restored here.
Details
- Reviewers
zzag davidedmundson - Group Reviewers
Plasma - Commits
- R278:21d67e31f718: [KWindowShadows] Check for X connection
Not sure if this is a good idea? is X smart enough to clean up after us?
- Still crashes in Breeze style but no longer without it
Diff Detail
- Repository
- R278 KWindowSystem
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Heh, I'm going to quote a conversation with you:
David Edmundson, [17.01.20 10:07]
would you say it's always wrong to have a QWindow outlive a QApplication?
Kai Uwe, [17.01.20 10:08]
I would say yes, why?
David Edmundson, [17.01.20 10:08]
wondering if I need to comment on some code that would crash if that happened
Kai Uwe, [17.01.20 10:13]
when qapp is gone the qpt and stuff will be torn down and then it will naturally crash if a window outlives it, no?
Then you went and proved that windows are torn down.
If we have a tile alive it means either a KWindowShadow object is alive or the QStyle is still alive, and both should be destroyed before the QPA.
Do you have the full bt of the crash?