D17311: Make sure that effect windows outlive effects

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION 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

REPOSITORY
  R108 KWin

BRANCH
  dont-crash-when-suspending-compositing

REVISION DETAIL
  https://phabricator.kde.org/D17311

AFFECTED FILES
  autotests/integration/CMakeLists.txt
  autotests/integration/dont_crash_reinitialize_compositor.cpp
  composite.cpp
  effects.cpp
  effects.h

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.