Application: kwin (4.11.2) KDE Platform Version: 4.11.2 Qt Version: 4.8.5 Operating System: Linux 3.11.4-201.fc19.x86_64 x86_64 Distribution: "Fedora release 19 (Schrödinger’s Cat)" -- Information about the crash: - What I was doing when the application crashed: I start my session on my laptop screen without the external screen. When completed, I plug my second screen and organize by moving some windows from my external screen (which is the principal) to the laptop screen (same desktop but different screen). Kwin crashes during this operation; if it isn't during the first move, the second is the good one to produce the crash. The crash can be reproduced every time. -- Backtrace: Application: KWin (kwin), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) [Current thread is 1 (Thread 0x7fdd592a18c0 (LWP 1900))] Thread 2 (Thread 0x7fdd2943d700 (LWP 1914)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 #1 0x00007fdd5826f0bb in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7fdd5856cf00 <QTWTF::pageheap_memory>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359 #2 0x00007fdd5826f0f9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464 #3 0x00007fdd52a62c53 in start_thread (arg=0x7fdd2943d700) at pthread_create.c:308 #4 0x00007fdd50c13e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113 Thread 1 (Thread 0x7fdd592a18c0 (LWP 1900)): [KCrash Handler] #6 KWin::PresentWindowsEffect::calculateWindowTransformationsClosest (this=this@entry=0x2bc4c80, windowlist=..., screen=1, motionManager=...) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/presentwindows/presentwindows.cpp:1006 #7 0x00007fdd2858e087 in KWin::PresentWindowsEffect::calculateWindowTransformations (this=0x2bc4c80, windowlist=..., screen=screen@entry=1, motionManager=..., external=external@entry=true) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/presentwindows/presentwindows.cpp:972 #8 0x00007fdd28594605 in KWin::PresentWindowsEffectProxy::calculateWindowTransformations (this=0x2bc4c90, windows=..., screen=screen@entry=1, manager=...) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/presentwindows/presentwindows_proxy.cpp:39 #9 0x00007fdd285a001b in KWin::DesktopGridEffect::setup (this=this@entry=0x2b903d0) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/desktopgrid/desktopgrid.cpp:1104 #10 0x00007fdd285a2073 in KWin::DesktopGridEffect::setActive (this=0x2b903d0, active=<optimized out>) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/desktopgrid/desktopgrid.cpp:1040 #11 0x00007fdd285a2363 in toggle (this=0x2b903d0) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/desktopgrid/desktopgrid.cpp:1026 #12 KWin::DesktopGridEffect::borderActivated (this=0x2b903d0, border=<optimized out>) at /usr/src/debug/kde-workspace-4.11.2/kwin/effects/desktopgrid/desktopgrid.cpp:753 #13 0x00007fdd53f25b73 in KWin::Effect::qt_static_metacall (_o=<optimized out>, _a=0x7fff44b823c0, _id=<optimized out>, _c=<optimized out>) at /usr/src/debug/kde-workspace-4.11.2/x86_64-redhat-linux-gnu/kwin/libkwineffects/kwineffects.moc:50 #14 0x00007fdd52df90f8 in QMetaMethod::invoke (this=this@entry=0x7fff44b825b0, object=object@entry=0x2b903d0, connectionType=Qt::DirectConnection, connectionType@entry=Qt::AutoConnection, returnValue=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1664 #15 0x00007fdd52dfb5b8 in QMetaObject::invokeMethod (obj=0x2b903d0, member=<optimized out>, type=type@entry=Qt::AutoConnection, ret=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:1179 #16 0x00007fdd58e7aacb in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., val4=..., val3=..., val2=..., val1=..., val0=..., ret=..., member=<optimized out>, obj=<optimized out>) at /usr/include/QtCore/qobjectdefs.h:401 #17 KWin::Edge::handleByCallback (this=this@entry=0x2654a00) at /usr/src/debug/kde-workspace-4.11.2/kwin/screenedge.cpp:222 #18 0x00007fdd58e7bf00 in KWin::Edge::handle (this=this@entry=0x2654a00, cursorPos=...) at /usr/src/debug/kde-workspace-4.11.2/kwin/screenedge.cpp:181 #19 0x00007fdd58e7bf87 in KWin::Edge::check (this=0x2654a00, cursorPos=..., triggerTime=..., forceNoPushBack=<optimized out>) at /usr/src/debug/kde-workspace-4.11.2/kwin/screenedge.cpp:135 #20 0x00007fdd58e7c13d in KWin::ScreenEdges::handleEnterNotifiy (this=this@entry=0x254cbe0, window=31482314, point=..., timestamp=...) at /usr/src/debug/kde-workspace-4.11.2/kwin/screenedge.cpp:1011 #21 0x00007fdd58e7c303 in KWin::ScreenEdges::isEntered (this=0x254cbe0, e=e@entry=0x7fff44b82d60) at /usr/src/debug/kde-workspace-4.11.2/kwin/screenedge.cpp:976 #22 0x00007fdd58ddb02e in KWin::Workspace::workspaceEvent (this=0x25bde60, e=e@entry=0x7fff44b82d60) at /usr/src/debug/kde-workspace-4.11.2/kwin/events.cpp:306 #23 0x00007fdd58dcf920 in KWin::Application::x11EventFilter (this=0x7fff44b83150, e=0x7fff44b82d60) at /usr/src/debug/kde-workspace-4.11.2/kwin/main.cpp:422 #24 0x00007fdd51fe439c in qt_x11EventFilter (ev=0x7fff44b82d60) at kernel/qapplication_x11.cpp:435 #25 0x00007fdd51ff1e89 in QApplication::x11ProcessEvent (this=0x7fff44b83150, event=event@entry=0x7fff44b82d60) at kernel/qapplication_x11.cpp:3373 #26 0x00007fdd52019880 in QEventDispatcherX11::processEvents (this=0x23cec80, flags=...) at kernel/qeventdispatcher_x11.cpp:132 #27 0x00007fdd52defecf in QEventLoop::processEvents (this=this@entry=0x7fff44b82fc0, flags=...) at kernel/qeventloop.cpp:149 #28 0x00007fdd52df01c5 in QEventLoop::exec (this=this@entry=0x7fff44b82fc0, flags=...) at kernel/qeventloop.cpp:204 #29 0x00007fdd52df545b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221 #30 0x00007fdd51f7ac9c in QApplication::exec () at kernel/qapplication.cpp:3823 #31 0x00007fdd58dd0806 in kdemain (argc=1, argv=0x7fff44b83298) at /usr/src/debug/kde-workspace-4.11.2/kwin/main.cpp:597 #32 0x00007fdd50b3fb75 in __libc_start_main (main=0x4009d0 <main(int, char**)>, argc=1, ubp_av=0x7fff44b83298, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff44b83288) at libc-start.c:274 #33 0x0000000000400a01 in _start () Possible duplicates by query: bug 314409. Reported using DrKonqi
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