Summary: | Kwin crashes when moving a window on a dual screen | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Stephan Peccini <stephan> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | 0inkane, jlp |
Priority: | NOR | Keywords: | drkonqi |
Version: | 4.11.2 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
possible patch |
Description
Stephan Peccini
2013-10-15 05:27:55 UTC
The backtrace says that the desktopgrid effec was starting up (active border/corner activation) what does not match your description of the actions leading to the crash, or does it? Sorry, I wasn't precise in my description. I move my windows from screen to screen with the desktop grid activated; I have to check if I have the same problem without the grid. I will put the result as soon as possible. I have no more problem; I don't know why, surely after an update. How to close it without tagging it as resolved? Resolving as by comment #3 Feel free to just re-open the bug if it occurs again. Created attachment 85641 [details]
New crash information added by DrKonqi
kwin (4.11.7) on KDE Platform 4.12.90 using Qt 4.8.5
I started getting this crash now with KWin from 4.13 git branch. I plug in external laptop monitor via VGA port and then try to display desktop grid and I get the crash.
-- Backtrace (Reduced):
#6 KWin::PresentWindowsEffect::calculateWindowTransformationsClosest (this=this@entry=0x3379ac0, windowlist=..., screen=1, motionManager=...) at /var/tmp/portage/kde-base/kwin-4.11.49.9999/work/kwin-4.11.49.9999/kwin/effects/presentwindows/presentwindows.cpp:1013
#7 0x00007f717d910e54 in KWin::PresentWindowsEffect::calculateWindowTransformations (this=0x3379ac0, windowlist=..., screen=screen@entry=1, motionManager=..., external=external@entry=true) at /var/tmp/portage/kde-base/kwin-4.11.49.9999/work/kwin-4.11.49.9999/kwin/effects/presentwindows/presentwindows.cpp:979
#8 0x00007f717d9177c5 in KWin::PresentWindowsEffectProxy::calculateWindowTransformations (this=0x3379ad0, windows=..., screen=screen@entry=1, manager=...) at /var/tmp/portage/kde-base/kwin-4.11.49.9999/work/kwin-4.11.49.9999/kwin/effects/presentwindows/presentwindows_proxy.cpp:39
#9 0x00007f717d92394c in KWin::DesktopGridEffect::setup (this=this@entry=0x1bfd8c0) at /var/tmp/portage/kde-base/kwin-4.11.49.9999/work/kwin-4.11.49.9999/kwin/effects/desktopgrid/desktopgrid.cpp:1109
#10 0x00007f717d9259c2 in KWin::DesktopGridEffect::setActive (this=0x1bfd8c0, active=<optimized out>) at /var/tmp/portage/kde-base/kwin-4.11.49.9999/work/kwin-4.11.49.9999/kwin/effects/desktopgrid/desktopgrid.cpp:1045
Created attachment 85675 [details]
possible patch
The desktopgrid is not robust against screen count changes *while* being up, but i could not cause issues when activating *after* the screen count being changed.
Could be a delayed change?
Attached is a "hotfix" (it's not absolutely perfect but should not eat kittens either) - it would be great if you could try it against your scenario?
Git commit 4fe7460e03f5cd4f64d85d20a6d85ce3a66f4ae8 by Thomas Lübking. Committed on 26/03/2014 at 17:03. Pushed by luebking into branch 'KDE/4.11'. setup desktopgrid for screencount change prevents segfaults.. REVIEW: 117067 M +10 -3 kwin/effects/desktopgrid/desktopgrid.cpp M +1 -1 kwin/effects/desktopgrid/desktopgrid.h http://commits.kde.org/kde-workspace/4fe7460e03f5cd4f64d85d20a6d85ce3a66f4ae8 *** Bug 333920 has been marked as a duplicate of this bug. *** Git commit 17ca566154321eb6d81204a8cd54429a6725ed92 by Martin Gräßlin, on behalf of Thomas Lübking. Committed on 26/03/2014 at 17:03. Pushed by graesslin into branch 'master'. setup desktopgrid for screencount change prevents segfaults.. Forward port of 4fe7460e03f5cd4f64d85d20a6d85ce3a66f4ae8 from kde-workspace M +8 -3 effects/desktopgrid/desktopgrid.cpp http://commits.kde.org/kwin/17ca566154321eb6d81204a8cd54429a6725ed92 Git commit 57f8c6d5f88cfb05945d8a2837ed0cec3218e2f9 by Thomas Lübking. Committed on 14/09/2015 at 19:01. Pushed by luebking into branch 'Plasma/5.4'. recreate presentwindows grids from desktopgrid Theory: ---------- because PresentWindowsEffect::screenCountChanged() is shortcut for "if (!isActive())", but the desktopgrid doesn't call PresentWindowsEffect::setActive (or at least PresentWindowsEffect::screenCountChanged), so the effect can "miss" the increasing screen count change (it sees the signal, but ignores it) and when desktopgrid calls it, it assumes the m_gridSizes array is big enough (but it isn't) Steps: ---------- 1. effects are loaded, 1 screen present 2. 2nd screen gets added, but inactive effects ignore that 3. desktop grid gets activated, updates according to screen count, calls presentwindows for screen #2 4. presentwindows data is only prepared for one screen from step 1 => BOOM Related: bug 351724 FIXED-IN: 5.4.2 REVIEW: 124960 M +1 -0 effects/desktopgrid/desktopgrid.cpp M +8 -5 effects/presentwindows/presentwindows.cpp M +1 -1 effects/presentwindows/presentwindows.h M +5 -0 effects/presentwindows/presentwindows_proxy.cpp M +2 -0 effects/presentwindows/presentwindows_proxy.h http://commits.kde.org/kwin/57f8c6d5f88cfb05945d8a2837ed0cec3218e2f9 |