D25768: Fix crash in XRenderPictureData::~XRenderPictureData

Vlad Zahorodnii noreply at phabricator.kde.org
Thu Dec 5 17:10:06 GMT 2019


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
  If the XRender scene has cross-faded a window, then, eventually, KWin/X11 will
  crash in the destructor of the XRenderPictureData class during tear down with
  the following message in the terminal
  
    ASSERT: "qApp" in file /home/vlad/Workspace/KDE/src/kde/workspace/kwin/libkwineffects/kwinxrenderutils.cpp, line 163
  
  The crash happens because X11StandalonePlatform attempts to clean up XRender
  resources, including XRenderUtils::s_blendPicture, after the application object
  has been destroyed.
  
  In order to fix the crash, we have to destroy the platform object before the
  destructor of QCoreApplication is executed.

TEST PLAN
  - Enable maximize effect
  - Maximize a window
  - Replace the current instance of KWin/X11 with another one
  
  Without this patch, KWin/X11 crashes after the third step.

REPOSITORY
  R108 KWin

BRANCH
  adjust-xrender-scene

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

AFFECTED FILES
  main.cpp
  main.h

To: zzag, #kwin
Cc: kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191205/087b179b/attachment-0001.html>


More information about the kwin mailing list