Make sure that effect windows outlive effects
ClosedPublic

Authored by zzag on Sun, Dec 2, 3:25 PM.

Details

Summary

Compositing is suspended/finished in a very hard way fashion, effect
windows are destroyed without notifying effects about it.

AnimationEffect tries gracefully release deleted windows, but because
in some cases(like when suspending compositing) a deleted window can
be already destroyed, a segmentation fault can happen.

This change adjusts the order in which effect windows and effects are
destroyed, so AnimationEffect (and other effects) cannot access dangling
pointers.

BUG: 400788
FIXED-IN: 5.15.0

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.
zzag created this revision.Sun, Dec 2, 3:25 PM
Restricted Application added a project: KWin. · View Herald TranscriptSun, Dec 2, 3:25 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Sun, Dec 2, 3:25 PM

Are you sure that nothing in windowClosed and finishCompositing accesses EffectsHandler?

zzag added a comment.Sun, Dec 2, 3:45 PM

Are you sure that nothing in windowClosed and finishCompositing accesses EffectsHandler?

The only use-case I found is the destructor of SceneOpenGLShadow, but D17306 should address it.

graesslin accepted this revision.Sun, Dec 2, 4:29 PM
This revision is now accepted and ready to land.Sun, Dec 2, 4:29 PM
This revision was automatically updated to reflect the committed changes.