https://bugs.kde.org/show_bug.cgi?id=363251

--- Comment #4 from Martin Gräßlin <mgraess...@kde.org> ---
Git commit d49fba5d30cbc4a7d8530def7656f1bd6e71484a by Martin Gräßlin.
Committed on 13/06/2016 at 13:29.
Pushed by graesslin into branch 'master'.

[libkwinxrenderutils] Clean up static blend picture before going down

Summary:
The method xRenderBlendPicture created a static XRenderPicture on
first usage. To cleanup a XRenderPicture an xcb_connection_t* is needed.
As it's static the cleanup happens on exit handler and at that time Qt
already destroyed the xcb_connection_t*. With a certain chance this will
crash.

To expose the problem a Q_ASSERT(qApp) is added in the destructor of
XRenderPicture. Using xrenderBlendPicture() will hit this assert on
application exit. This is demonstrated by the added auto test.

The actual fix to the problem is moving the static variable out of
the method and introduce a global cleanup method just like the init
method. This is now called from Workspace dtor, so before application
goes down.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

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

M  +1    -0    autotests/CMakeLists.txt
A  +11   -0    autotests/libxrenderutils/CMakeLists.txt
A  +59   -0    autotests/libxrenderutils/blendpicture_test.cpp     [License:
GPL (v2)]
M  +16   -6    libkwineffects/kwinxrenderutils.cpp
M  +5    -0    libkwineffects/kwinxrenderutils.h
M  +3    -0    workspace.cpp

http://commits.kde.org/kwin/d49fba5d30cbc4a7d8530def7656f1bd6e71484a

--- Comment #5 from Martin Gräßlin <mgraess...@kde.org> ---
Git commit 1b40feca3a119f8d7098bff299cb8be4032fedda by Martin Gräßlin.
Committed on 13/06/2016 at 13:29.
Pushed by graesslin into branch 'master'.

SceneXRender::Window uses a static XRenderPicture which it didn't clean up

Summary:
Using a static XRenderPicture results in a crash on exit as for cleanup
the already destroyed xcb_connection_t* is required.

This change ensures that the static XRenderPicture gets destroyed in the
static cleanup handler for SceneXRender::Window.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

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

M  +8    -5    scene_xrender.cpp
M  +1    -0    scene_xrender.h

http://commits.kde.org/kwin/1b40feca3a119f8d7098bff299cb8be4032fedda

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to