Summary: | Changed Rendering Backend kwin --reload crash | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | phillip |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | Keywords: | drkonqi |
Priority: | NOR | ||
Version: | 5.5.5 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
phillip
2016-05-19 01:17:26 UTC
the crash happens in the old kwin, which you stopped by starting a new. It's a crash during cleanup. Looks to me like it tried accessing xcb after the connection got already destroyed. If my theory is correct, then we have two possible places for that: libkwineffects/kwinxrenderutils.cpp: static XRenderPicture s_blendPicture(XCB_RENDER_PICTURE_NONE); scene_xrender.cpp: static XRenderPicture cFadeAlpha(XCB_RENDER_PICTURE_NONE); Both are static XRenderPictures which would be cleaned up after the application terminated the xcb connection. one case addressed with: https://phabricator.kde.org/D1731 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 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 I hope that were the only cases where we hit this situation. Assuming fixed. Thanks for reporting, that was an interesting crash (and I like those ;-) ). |