You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martin Gräßlin d49fba5d30 [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.

CCBUG: 363251

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D1731
8 years ago
..
autotests
CMakeLists.txt
Mainpage.dox
Messages.sh
anidata.cpp
anidata_p.h use a global static for animation ids 9 years ago
kwinanimationeffect.cpp use a global static for animation ids 9 years ago
kwinanimationeffect.h allow to retarget animations 9 years ago
kwinconfig.h.cmake
kwineffects.cpp Be sure isCurrentTab returns true 8 years ago
kwineffects.h
kwinglcolorcorrection.cpp
kwinglcolorcorrection.h
kwinglcolorcorrection_p.h
kwinglobals.h Destroy static Client helper window before application goes down 8 years ago
kwinglplatform.cpp
kwinglplatform.h
kwingltexture.cpp
kwingltexture.h
kwingltexture_p.h
kwinglutils.cpp
kwinglutils.h
kwinglutils_funcs.cpp
kwinglutils_funcs.h
kwinxrenderutils.cpp [libkwinxrenderutils] Clean up static blend picture before going down 8 years ago
kwinxrenderutils.h [libkwinxrenderutils] Clean up static blend picture before going down 8 years ago
logging.cpp
logging_p.h