Make sure that effect windows outlive effects
ClosedPublic

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

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

zzag added a comment.Dec 2 2018, 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.Dec 2 2018, 4:29 PM
This revision is now accepted and ready to land.Dec 2 2018, 4:29 PM
This revision was automatically updated to reflect the committed changes.