Ensure the Compositor does not start during termination
ClosedPublic

Authored by graesslin on Jan 6 2019, 4:12 PM.

Details

Summary

The SceneOpenGLES test was starting to randomly crash on my system. On
investigation I observed that there was a graphics reset ("Attempting to
reset compositing.") which triggered a delayed restart of the
compositor. This even was only processed while waiting for XWayland to
terminate. Which resulted in a crash in KWin::getXServerVersion as the
xcb connection broke.

It makes no sense to setup the compositor again during application
shutdown. Thus the dtors set a flag that they are terminating the
application and Compositor::setup is checking for it.

Test Plan

Test no longer crashes, although it goes through the crashing path

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Jan 6 2019, 4:12 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 6 2019, 4:12 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Jan 6 2019, 4:12 PM
zzag added a subscriber: zzag.Jan 6 2019, 4:27 PM
zzag added inline comments.
composite.cpp
160

Coding style.

Could you please also add a short explanatory comment?

graesslin updated this revision to Diff 49090.Jan 9 2019, 6:03 PM

Fix condig style (uups) and add comment

zzag accepted this revision.Jan 9 2019, 6:07 PM
This revision is now accepted and ready to land.Jan 9 2019, 6:07 PM
This revision was automatically updated to reflect the committed changes.