Diffusion KWin a7e18789cbd6

Fix crash in XRenderPictureData::~XRenderPictureData

Authored by zzag on Dec 12 2019, 12:06 PM.

Description

Fix crash in XRenderPictureData::~XRenderPictureData

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.

Reviewers: KWin, davidedmundson

Reviewed By: KWin, davidedmundson

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D25768

Details

Committed
zzagDec 12 2019, 12:06 PM
Reviewer
KWin
Differential Revision
D25768: Fix crash in XRenderPictureData::~XRenderPictureData
Parents
R108:2c8ff56540a3: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown