Bug 336511 - KWin freezes when disconnecting a screen, then crashes if I toggle compositing
Summary: KWin freezes when disconnecting a screen, then crashes if I toggle compositing
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: git master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-20 15:58 UTC by Aleix Pol
Modified: 2019-02-27 23:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
The workspace after extending (279.38 KB, image/png)
2014-06-23 14:15 UTC, Aleix Pol
Details
a picture of what I saw (1.67 MB, image/jpeg)
2014-06-23 14:16 UTC, Aleix Pol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleix Pol 2014-06-20 15:58:51 UTC
Can reproduce quite easily.

Thread 4 (Thread 0x7f6e446e2700 (LWP 1796)):
#0  0x00007f6e63cdbe27 in QFlags<QEventLoop::ProcessEventsFlag>::operator& (this=0x7f6e446e1a80, f=QEventLoop::ExcludeSocketNotifiers) at ../../include/QtCore/../../../../frameworks/qt5/qtbase/src/corelib/global/qflags.h:126
#1  0x00007f6e63cd9cf0 in QEventDispatcherUNIXPrivate::doSelect (this=0x7f6e3c0008e0, flags=..., timeout=0x0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:185
#2  0x00007f6e63cdbb49 in QEventDispatcherUNIX::processEvents (this=0x7f6e3c0008c0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:615
#3  0x00007f6e63c658e6 in QEventLoop::processEvents (this=0x7f6e446e1d60, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:136
#4  0x00007f6e63c65bbf in QEventLoop::exec (this=0x7f6e446e1d60, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:212
#5  0x00007f6e63a4719c in QThread::exec (this=0x27c3bd0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthread.cpp:511
#6  0x00007f6e6aeb98c5 in QQmlThreadPrivate::run (this=0x27c3bd0) at /home/kde-devel/frameworks/qt5/qtdeclarative/src/qml/qml/ftw/qqmlthread.cpp:149
#7  0x00007f6e63a4e6cd in QThreadPrivate::start (arg=0x27c3bd0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:345
#8  0x00007f6e620cd124 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f6e6281c4bd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f6e41d1e700 (LWP 8463)):
#0  0x00007f6e620d1ed8 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f6e63a4fd39 in QWaitConditionPrivate::wait_relative (this=0x25c0d40, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:126
#2  0x00007f6e63a4fd66 in QWaitConditionPrivate::wait (this=0x25c0d40, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:134
#3  0x00007f6e63a4fb55 in QWaitCondition::wait (this=0x258f2c0, mutex=0x25c0ae0, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:208
#4  0x00007f6e63a48412 in QThreadPoolThread::run (this=0x258f2b0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:135
#5  0x00007f6e63a4e6cd in QThreadPrivate::start (arg=0x258f2b0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:345
#6  0x00007f6e620cd124 in start_thread () from /usr/lib/libpthread.so.0
#7  0x00007f6e6281c4bd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f6e4d37c700 (LWP 8464)):
#0  0x00007f6e620d1ed8 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f6e63a4fd39 in QWaitConditionPrivate::wait_relative (this=0x2f62ea0, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:126
#2  0x00007f6e63a4fd66 in QWaitConditionPrivate::wait (this=0x2f62ea0, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:134
#3  0x00007f6e63a4fb55 in QWaitCondition::wait (this=0x2f62ce0, mutex=0x25c0ae0, time=30000) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:208
#4  0x00007f6e63a48412 in QThreadPoolThread::run (this=0x2f62cd0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthreadpool.cpp:135
#5  0x00007f6e63a4e6cd in QThreadPrivate::start (arg=0x2f62cd0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:345
#6  0x00007f6e620cd124 in start_thread () from /usr/lib/libpthread.so.0
#7  0x00007f6e6281c4bd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f6e6d796800 (LWP 1788)):
[KCrash Handler]
#6  0x00007f6e56858aac in QXcbConnection::xlib_display (this=0x54) at /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.h:391
#7  0x00007f6e56870d2b in QGLXContext::doneCurrent (this=0x35ead70) at /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/qglxintegration.cpp:381
#8  0x00007f6e64288ecf in QOpenGLContext::doneCurrent (this=0x35ec4b0) at /home/kde-devel/frameworks/qt5/qtbase/src/gui/kernel/qopenglcontext.cpp:845
#9  0x00007f6e6d29457f in KWin::GlxBackend::makeCurrent (this=0x3c9b6a0) at /home/kde-devel/frameworks/kwin/glxbackend.cpp:589
#10 0x00007f6e6d280be7 in KWin::SceneOpenGL::makeOpenGLContextCurrent (this=0x3e49ee0) at /home/kde-devel/frameworks/kwin/scene_opengl.cpp:554
#11 0x00007f6e6d2a0613 in KWin::EffectsHandlerImpl::makeOpenGLContextCurrent (this=0x3efaf40) at /home/kde-devel/frameworks/kwin/effects.cpp:1497
#12 0x00007f6e6d2bca87 in KWin::OpenGLPaintRedirector::resizePixmaps (this=0x26605b0, rects=0x7fffa4cc18f0) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:359
#13 0x00007f6e6d2bc560 in KWin::PaintRedirector::resizePixmaps (this=0x26605b0) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:246
#14 0x00007f6e6d2bc859 in KWin::OpenGLPaintRedirector::OpenGLPaintRedirector (this=0x26605b0, c=0x26cbb80, deco=0x27b33e0) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:342
#15 0x00007f6e6d2bb6ab in KWin::PaintRedirector::create (c=0x26cbb80, deco=0x27b33e0) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:45
#16 0x00007f6e6d1c97a4 in KWin::Client::createDecoration (this=0x26cbb80, oldgeom=...) at /home/kde-devel/frameworks/kwin/client.cpp:571
#17 0x00007f6e6d1c8e8d in KWin::Client::updateDecoration (this=0x26cbb80, check_workspace_pos=true, force=true) at /home/kde-devel/frameworks/kwin/client.cpp:516
#18 0x00007f6e6d266e24 in KWin::Client::setupCompositing (this=0x26cbb80) at /home/kde-devel/frameworks/kwin/composite.cpp:1111
#19 0x00007f6e6d26287f in KWin::Compositor::slotCompositingOptionsInitialized (this=0x25f8870) at /home/kde-devel/frameworks/kwin/composite.cpp:279
#20 0x00007f6e6d261b43 in KWin::Compositor::setup (this=0x25f8870) at /home/kde-devel/frameworks/kwin/composite.cpp:165
#21 0x00007f6e6d264383 in KWin::Compositor::resume (this=0x25f8870, reason=KWin::Compositor::AllReasonSuspend) at /home/kde-devel/frameworks/kwin/composite.cpp:509
#22 0x00007f6e6d263bed in KWin::Compositor::slotToggleCompositing (this=0x25f8870) at /home/kde-devel/frameworks/kwin/composite.cpp:449
#23 0x00007f6e6d1b83d1 in KWin::Workspace::slotToggleCompositing (this=0x25c0470) at /home/kde-devel/frameworks/kwin/workspace.cpp:1528
#24 0x00007f6e6d23e927 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Workspace::*)()>::call(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (f=(void (KWin::Workspace::*)(KWin::Workspace * const)) 0x7f6e6d1b83a8 <KWin::Workspace::slotToggleCompositing()>, o=0x25c0470, arg=0x7fffa4cc23e0) at /home/kde-devel/kde5/include/QtCore/qobjectdefs_impl.h:508
#25 0x00007f6e6d23e824 in QtPrivate::FunctionPointer<void (KWin::Workspace::*)()>::call<QtPrivate::List<>, void>(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (f=(void (KWin::Workspace::*)(KWin::Workspace * const)) 0x7f6e6d1b83a8 <KWin::Workspace::slotToggleCompositing()>, o=0x25c0470, arg=0x7fffa4cc23e0) at /home/kde-devel/kde5/include/QtCore/qobjectdefs_impl.h:527
#26 0x00007f6e6d23e3cb in QtPrivate::QSlotObject<void (KWin::Workspace::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x2679b70, r=0x25c0470, a=0x7fffa4cc23e0, ret=0x0) at /home/kde-devel/kde5/include/QtCore/qobject_impl.h:151
#27 0x00007f6e63cad3b9 in QtPrivate::QSlotObjectBase::call (this=0x2679b70, r=0x25c0470, a=0x7fffa4cc23e0) at ../../include/QtCore/../../../../frameworks/qt5/qtbase/src/corelib/kernel/qobject_impl.h:132
#28 0x00007f6e63caa606 in QMetaObject::activate (sender=0x2677c80, signalOffset=3, local_signal_index=1, argv=0x7fffa4cc23e0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3666
#29 0x00007f6e63ca9f2e in QMetaObject::activate (sender=0x2677c80, m=0x7f6e652f6e60 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fffa4cc23e0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3546
#30 0x00007f6e64abe09a in QAction::triggered (this=0x2677c80, _t1=false) at .moc/moc_qaction.cpp:359
#31 0x00007f6e64abd43c in QAction::activate (this=0x2677c80, event=QAction::Trigger) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qaction.cpp:1175
#32 0x00007f6e6a710fa5 in QAction::trigger (this=0x2677c80) at /home/kde-devel/kde5/include/QtWidgets/qaction.h:185
#33 0x00007f6e6a70d728 in KGlobalAccelPrivate::_k_invokeAction (this=0x25faf10, componentUnique=..., actionUnique=..., timestamp=18886287) at /home/kde-devel/frameworks/kglobalaccel/src/kglobalaccel.cpp:423
#34 0x00007f6e6a70ed2d in KGlobalAccel::qt_static_metacall (_o=0x7f6e6a92ddb0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffa4cc2700) at src/moc_kglobalaccel.cpp:89
#35 0x00007f6e63caa713 in QMetaObject::activate (sender=0x258d440, signalOffset=3, local_signal_index=0, argv=0x7fffa4cc2700) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3680
#36 0x00007f6e63ca9f2e in QMetaObject::activate (sender=0x258d440, m=0x7f6e6a92d220 <OrgKdeKglobalaccelComponentInterface::staticMetaObject>, local_signal_index=0, argv=0x7fffa4cc2700) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3546
#37 0x00007f6e6a71e7b3 in OrgKdeKglobalaccelComponentInterface::globalShortcutPressed (this=0x258d440, _t1=..., _t2=..., _t3=18886287) at src/kglobalaccel_component_interface.moc:215
#38 0x00007f6e6a71e228 in OrgKdeKglobalaccelComponentInterface::qt_static_metacall (_o=0x258d440, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffa4cc2880) at src/kglobalaccel_component_interface.moc:116
#39 0x00007f6e6a71e613 in OrgKdeKglobalaccelComponentInterface::qt_metacall (this=0x258d440, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffa4cc2880) at src/kglobalaccel_component_interface.moc:173
#40 0x00007f6e657b1665 in QDBusConnectionPrivate::deliverCall (this=0x255a800, object=0x258d440, msg=..., metaTypes=..., slotIdx=6) at /home/kde-devel/frameworks/qt5/qtbase/src/dbus/qdbusintegrator.cpp:991
#41 0x00007f6e657bbc35 in QDBusCallDeliveryEvent::placeMetaCall (this=0x3b6cad0, object=0x258d440) at /home/kde-devel/frameworks/qt5/qtbase/src/dbus/qdbusintegrator_p.h:103
#42 0x00007f6e63ca3f5c in QObject::event (this=0x258d440, e=0x3b6cad0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:1241
#43 0x00007f6e64acc946 in QApplicationPrivate::notify_helper (this=0x2511260, receiver=0x258d440, e=0x3b6cad0) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3522
#44 0x00007f6e64aca18e in QApplication::notify (this=0x7fffa4cc3760, receiver=0x258d440, e=0x3b6cad0) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2975
#45 0x00007f6e6d1f99e5 in KWin::Application::notify (this=0x7fffa4cc3760, o=0x258d440, e=0x3b6cad0) at /home/kde-devel/frameworks/kwin/main.cpp:344
#46 0x00007f6e63c68c00 in QCoreApplication::notifyInternal (this=0x7fffa4cc3760, receiver=0x258d440, event=0x3b6cad0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:935
#47 0x00007f6e63c6c83b in QCoreApplication::sendEvent (receiver=0x258d440, event=0x3b6cad0) at ../../include/QtCore/../../../../frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.h:237
#48 0x00007f6e63c69f19 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x24fc600) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1539
#49 0x00007f6e63cdb9ff in QEventDispatcherUNIX::processEvents (this=0x253f6e0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:587
#50 0x00007f6e568b354a in QUnixEventDispatcherQPA::processEvents (this=0x253f6e0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/platformsupport/eventdispatchers/qunixeventdispatcher.cpp:70
#51 0x00007f6e63c658e6 in QEventLoop::processEvents (this=0x7fffa4cc3680, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:136
#52 0x00007f6e63c65bbf in QEventLoop::exec (this=0x7fffa4cc3680, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:212
#53 0x00007f6e63c692ba in QCoreApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1188
#54 0x00007f6e64243270 in QGuiApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1446
#55 0x00007f6e64ac99bb in QApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2767
#56 0x00007f6e6d1fb14c in kdemain (argc=2, argv=0x7fffa4cc3dd8) at /home/kde-devel/frameworks/kwin/main.cpp:559
#57 0x0000000000400cf8 in main (argc=2, argv=0x7fffa4cc3dd8) at kwin_dummy.cpp:3
Comment 1 Martin Flöser 2014-06-20 21:11:35 UTC
are you using Aurorae (Breeze)? If yes, can you reproduce without (e.g. 
Oxygen)?
Comment 2 Aleix Pol 2014-06-20 21:50:47 UTC
I'm using Oxygen.
Comment 3 Martin Flöser 2014-06-21 05:42:14 UTC
> I'm using Oxygen.

whoa, that makes this crash extremely interesting. I fear we hit into 
something in Qt again :-(

The threaded rendering loop would probably circumvent that crash, but IIRC you 
are on Mesa drivers which would make it just much worse.

Just one thing which needs clarification: given the back trace it looks like 
it's happening when you press Alt+Shift+F12 but your description says it's 
when disconnecting the screen.
Comment 4 Aleix Pol 2014-06-21 23:42:58 UTC
I'm quite sure it was when disconnecting, I'm away today but I'll test again when I'm at the office on Monday.
If there's any further information that can be of use, tell me and I'll be happy to provide it.
Comment 5 Aleix Pol 2014-06-23 14:13:26 UTC
I've been trying again, with a fresh Qt 5.3, this is what I'm getting. Will attach a couple of pictures, I'm unsure it's related.
Comment 6 Aleix Pol 2014-06-23 14:15:59 UTC
Created attachment 87339 [details]
The workspace after extending

Didn't update the size or something, so I get both in the old, left-most screen.
Comment 7 Aleix Pol 2014-06-23 14:16:28 UTC
Created attachment 87340 [details]
a picture of what I saw
Comment 8 Martin Flöser 2014-06-23 15:16:27 UTC
I don't think it's related, but still not good that the compositor doesn't pick up the change. But if it looks like that I wouldn't be surprised if you pressed the toggle compositing shortcut and triggered the crash ;-)
Comment 9 Aleix Pol 2014-06-23 15:18:00 UTC
ok, maybe I tried to "fix" it by toggling the composite when the workspace got b0rked.
Comment 10 Aleix Pol 2014-06-26 15:01:02 UTC
I just had it again, that's how it happened.

Disconnected the screen, then it got to a weird state where the decoration (oxygen) wouldn't respond. Then I switched the compositing to see if that helps.
Boom!

#6  0x00007f1817913934 in QXcbConnection::xlib_display (this=0x0) at /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/qxcbconnection.h:393
#7  0x00007f181792bc9d in QGLXContext::doneCurrent (this=0xfba910) at /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/qglxintegration.cpp:381
#8  0x00007f1825345051 in QOpenGLContext::doneCurrent (this=0xfb6a80) at /home/kde-devel/frameworks/qt5/qtbase/src/gui/kernel/qopenglcontext.cpp:845
#9  0x00007f182e35157f in KWin::GlxBackend::makeCurrent (this=0x172cac0) at /home/kde-devel/frameworks/kwin/glxbackend.cpp:589
#10 0x00007f182e33dbe7 in KWin::SceneOpenGL::makeOpenGLContextCurrent (this=0x182b150) at /home/kde-devel/frameworks/kwin/scene_opengl.cpp:554
#11 0x00007f182e35d613 in KWin::EffectsHandlerImpl::makeOpenGLContextCurrent (this=0x18b3550) at /home/kde-devel/frameworks/kwin/effects.cpp:1497
#12 0x00007f182e379a87 in KWin::OpenGLPaintRedirector::resizePixmaps (this=0xad9480, rects=0x7fff41420820) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:359
#13 0x00007f182e379560 in KWin::PaintRedirector::resizePixmaps (this=0xad9480) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:246
#14 0x00007f182e379859 in KWin::OpenGLPaintRedirector::OpenGLPaintRedirector (this=0xad9480, c=0xb358f0, deco=0xb33190) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:342
#15 0x00007f182e3786ab in KWin::PaintRedirector::create (c=0xb358f0, deco=0xb33190) at /home/kde-devel/frameworks/kwin/paintredirector.cpp:45
#16 0x00007f182e2867a4 in KWin::Client::createDecoration (this=0xb358f0, oldgeom=...) at /home/kde-devel/frameworks/kwin/client.cpp:571
#17 0x00007f182e285e8d in KWin::Client::updateDecoration (this=0xb358f0, check_workspace_pos=true, force=true) at /home/kde-devel/frameworks/kwin/client.cpp:516
#18 0x00007f182e323e24 in KWin::Client::setupCompositing (this=0xb358f0) at /home/kde-devel/frameworks/kwin/composite.cpp:1111
#19 0x00007f182e31f87f in KWin::Compositor::slotCompositingOptionsInitialized (this=0xa7cdb0) at /home/kde-devel/frameworks/kwin/composite.cpp:279
#20 0x00007f182e31eb32 in KWin::Compositor::setup (this=0xa7cdb0) at /home/kde-devel/frameworks/kwin/composite.cpp:163
#21 0x00007f182e321383 in KWin::Compositor::resume (this=0xa7cdb0, reason=KWin::Compositor::AllReasonSuspend) at /home/kde-devel/frameworks/kwin/composite.cpp:509
#22 0x00007f182e320bed in KWin::Compositor::slotToggleCompositing (this=0xa7cdb0) at /home/kde-devel/frameworks/kwin/composite.cpp:449
#23 0x00007f182e2753d1 in KWin::Workspace::slotToggleCompositing (this=0xa657f0) at /home/kde-devel/frameworks/kwin/workspace.cpp:1528
#24 0x00007f182e2fb927 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::Workspace::*)()>::call(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (f=(void (KWin::Workspace::*)(KWin::Workspace * const)) 0x7f182e2753a8 <KWin::Workspace::slotToggleCompositing()>, o=0xa657f0, arg=0x7fff41421310) at /home/kde-devel/kde5/include/QtCore/qobjectdefs_impl.h:508
#25 0x00007f182e2fb824 in QtPrivate::FunctionPointer<void (KWin::Workspace::*)()>::call<QtPrivate::List<>, void>(void (KWin::Workspace::*)(), KWin::Workspace*, void**) (f=(void (KWin::Workspace::*)(KWin::Workspace * const)) 0x7f182e2753a8 <KWin::Workspace::slotToggleCompositing()>, o=0xa657f0, arg=0x7fff41421310) at /home/kde-devel/kde5/include/QtCore/qobjectdefs_impl.h:527
#26 0x00007f182e2fb3cb in QtPrivate::QSlotObject<void (KWin::Workspace::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0xb11a40, r=0xa657f0, a=0x7fff41421310, ret=0x0) at /home/kde-devel/kde5/include/QtCore/qobject_impl.h:151
#27 0x00007f1824d6953d in QtPrivate::QSlotObjectBase::call (this=0xb11a40, r=0xa657f0, a=0x7fff41421310) at ../../include/QtCore/../../../../frameworks/qt5/qtbase/src/corelib/kernel/qobject_impl.h:132
#28 0x00007f1824d6678a in QMetaObject::activate (sender=0xb0fb50, signalOffset=3, local_signal_index=1, argv=0x7fff41421310) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3666
#29 0x00007f1824d660b2 in QMetaObject::activate (sender=0xb0fb50, m=0x7f18263b3e60 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fff41421310) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3546
#30 0x00007f1825b7b0da in QAction::triggered (this=0xb0fb50, _t1=false) at .moc/moc_qaction.cpp:359
#31 0x00007f1825b7a47c in QAction::activate (this=0xb0fb50, event=QAction::Trigger) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qaction.cpp:1175
#32 0x00007f182b7ce191 in QAction::trigger (this=0xb0fb50) at /home/kde-devel/kde5/include/QtWidgets/qaction.h:185
#33 0x00007f182b7ca858 in KGlobalAccelPrivate::_k_invokeAction (this=0xa948f0, componentUnique=..., actionUnique=..., timestamp=18614192) at /home/kde-devel/frameworks/kglobalaccel/src/kglobalaccel.cpp:423
#34 0x00007f182b7cbf19 in KGlobalAccel::qt_static_metacall (_o=0x7f182b9eadc0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff41421630) at src/moc_kglobalaccel.cpp:89
#35 0x00007f1824d66897 in QMetaObject::activate (sender=0xa66650, signalOffset=3, local_signal_index=0, argv=0x7fff41421630) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3680
#36 0x00007f1824d660b2 in QMetaObject::activate (sender=0xa66650, m=0x7f182b9ea220 <OrgKdeKglobalaccelComponentInterface::staticMetaObject>, local_signal_index=0, argv=0x7fff41421630) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3546
#37 0x00007f182b7db9c9 in OrgKdeKglobalaccelComponentInterface::globalShortcutPressed (this=0xa66650, _t1=..., _t2=..., _t3=18614192) at src/kglobalaccel_component_interface.moc:215
#38 0x00007f182b7db43e in OrgKdeKglobalaccelComponentInterface::qt_static_metacall (_o=0xa66650, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff414217b0) at src/kglobalaccel_component_interface.moc:116
#39 0x00007f182b7db829 in OrgKdeKglobalaccelComponentInterface::qt_metacall (this=0xa66650, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff414217b0) at src/kglobalaccel_component_interface.moc:173
#40 0x00007f182686e665 in QDBusConnectionPrivate::deliverCall (this=0x9f1f20, object=0xa66650, msg=..., metaTypes=..., slotIdx=6) at /home/kde-devel/frameworks/qt5/qtbase/src/dbus/qdbusintegrator.cpp:991
#41 0x00007f1826878c6f in QDBusCallDeliveryEvent::placeMetaCall (this=0x1730b30, object=0xa66650) at /home/kde-devel/frameworks/qt5/qtbase/src/dbus/qdbusintegrator_p.h:103
#42 0x00007f1824d600e0 in QObject::event (this=0xa66650, e=0x1730b30) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:1241
#43 0x00007f1825b89986 in QApplicationPrivate::notify_helper (this=0x9a3990, receiver=0xa66650, e=0x1730b30) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3522
#44 0x00007f1825b871ce in QApplication::notify (this=0x7fff41422690, receiver=0xa66650, e=0x1730b30) at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2975
#45 0x00007f182e2b69e5 in KWin::Application::notify (this=0x7fff41422690, o=0xa66650, e=0x1730b30) at /home/kde-devel/frameworks/kwin/main.cpp:344
#46 0x00007f1824d24d84 in QCoreApplication::notifyInternal (this=0x7fff41422690, receiver=0xa66650, event=0x1730b30) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:935
#47 0x00007f1824d289bf in QCoreApplication::sendEvent (receiver=0xa66650, event=0x1730b30) at ../../include/QtCore/../../../../frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.h:237
#48 0x00007f1824d2609d in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9945d0) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1539
#49 0x00007f1824d97b83 in QEventDispatcherUNIX::processEvents (this=0x9d69c0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventdispatcher_unix.cpp:587
#50 0x00007f181796e4d0 in QUnixEventDispatcherQPA::processEvents (this=0x9d69c0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/platformsupport/eventdispatchers/qunixeventdispatcher.cpp:70
#51 0x00007f1824d21a6a in QEventLoop::processEvents (this=0x7fff414225b0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:136
#52 0x00007f1824d21d43 in QEventLoop::exec (this=0x7fff414225b0, flags=...) at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:212
#53 0x00007f1824d2543e in QCoreApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1188
#54 0x00007f18252ff2c2 in QGuiApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1466
#55 0x00007f1825b869fb in QApplication::exec () at /home/kde-devel/frameworks/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2767
#56 0x00007f182e2b814c in kdemain (argc=3, argv=0x7fff41422d08) at /home/kde-devel/frameworks/kwin/main.cpp:559
#57 0x0000000000400cf8 in main (argc=3, argv=0x7fff41422d08) at kwin_dummy.cpp:3
Comment 11 Martin Flöser 2014-06-27 08:26:04 UTC
(In reply to comment #10)
> I just had it again, that's how it happened.
> 
> Disconnected the screen, then it got to a weird state where the decoration
> (oxygen) wouldn't respond. Then I switched the compositing to see if that
> helps.
> Boom!

Thanks, that matches now what the backtrace says :-)

> 
> #6  0x00007f1817913934 in QXcbConnection::xlib_display (this=0x0) at
> /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/
> qxcbconnection.h:393
> #7  0x00007f181792bc9d in QGLXContext::doneCurrent (this=0xfba910) at
> /home/kde-devel/frameworks/qt5/qtbase/src/plugins/platforms/xcb/
> qglxintegration.cpp:381

That kind of looks like the QXcConnection is no more. Somehow this doesn't make sense to me.
Comment 12 Thomas Lübking 2014-06-27 08:34:12 UTC
(In reply to comment #11)

> That kind of looks like the QXcConnection is no more. Somehow this doesn't
> make sense to me.

Invalid parenting object (QXcbScreen)?
Comment 13 Thomas Lübking 2014-06-27 08:37:19 UTC
See first backtrace:

    QXcbConnection::xlib_display (this=0x54)
                                                                    ^^^^^^^^^^^
But what QOpenGLContext is "doneCurrent()"?
Comment 14 Martin Flöser 2014-06-27 13:59:29 UTC
recompiled Qt 5.3 branch today and are not able to reproduce. For one KWin resettles properly after disabling the screen (note: I disable through kscreen kcm), but also pressing the shortcut to disable compositing doesn't result in a crash.
Comment 15 Thomas Lübking 2014-06-27 14:18:24 UTC
I assume the critical thing is whatever is the QOpenGLContext which is apparently current at that time (and is apparently not Aurorae)

Also, do we have agreement on the HW/Driver combo?
Comment 16 Aleix Pol 2014-06-27 14:21:24 UTC
Both David an I have had this crash, on intel drivers on Archlinux stable. He is using mesa-git, I'm on Arch's as well.
Comment 17 Martin Flöser 2014-06-27 14:29:33 UTC
> I assume the critical thing is whatever is the QOpenGLContext which is
> apparently current at that time (and is apparently not Aurorae)

there shouldn't be any...

We have QtQuick in:
* outline
* present windows
* desktop grid
* desktop change OSD
* TabBox

I doubt that any of these components were used while the screen got disabled. 
Only possibility would be a left over context after using one of those.

> 
> Also, do we have agreement on the HW/Driver combo?

also intel here, but debian testing
Comment 18 Thomas Lübking 2014-06-27 14:43:09 UTC
(In reply to comment #17)
> Only possibility would be a left over context after using one of those.
Should be easy to test.

@Aleix
Do you get the crash right after restarting KWin w/o causing any of the mentioned items (stay away from PW/desktop switching, alt+tab and stuff like quick maximization/tiling)
Comment 19 Aleix Pol 2014-06-27 15:29:36 UTC
Well the problem is it doesn't always happen, only sometimes. Maybe we should try a valgrind run?
Comment 20 Martin Flöser 2014-06-27 15:58:12 UTC
(In reply to comment #19)
> Well the problem is it doesn't always happen, only sometimes. Maybe we
> should try a valgrind run?

I doubt valgrind will help here as somehow I think it could be timing dependent which means you wouldn't trigger it. Also from experience OpenGL drivers are so bad that it makes valgrinding of KWin pretty useless :-(
Comment 21 Thomas Lübking 2014-06-27 16:09:55 UTC
One more thing we should probably clarify: the backtrace suggests this happens when you *resume* the compositor. Does this match your experience?
Could it be a stuck keyboard (ie. Shift+Alt+F12 fires multiple times)?
Comment 22 Martin Flöser 2014-06-27 20:48:33 UTC
interesting bug: #336808 also after disconnecting screen crash in xcb-plugin
Comment 23 Thomas Lübking 2014-06-27 21:11:24 UTC
'key. That one crashes because QGuiApplication::primaryScreen() is nullptr what means QGuiApplicationPrivate::screen_list.isEmpty(), so the "cure" is to never access the connection() if QGuiApplication::screens().isEmpty() (what makes sense since the connection is ultimately picked from the screen)

I assume the various xcb_* calls won't react very gracefull if one passes them a nullptr connection ... that one's gonna be funny.
Comment 24 Martin Flöser 2014-06-28 06:03:38 UTC
interesting upstream bug: https://bugreports.qt-project.org/browse/QTBUG-32973
Comment 25 Thomas Lübking 2014-06-28 07:32:04 UTC
> We have to disable all outputs usually, in order to correctly assign CRTCs to the new screens.

This also explains why it didn't happen here at all - i do of course not remove all screens to add one. That's silly :-P

This is the segfault for "xrandr --output DVI-I-1 --off"

#0  0xaf2f7824 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#1  0xaf3110ae in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#2  0xb5ce7d7a in QX11Info::appRootWindow(int) ()
   from /usr/lib/libQt5X11Extras.so.5
#3  0xb5d167bd in ?? () from /usr/lib/libKF5WindowSystem.so.5
#4  0xb4dfbf07 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () from /usr/lib/libQt5Core.so.5
#5  0xaf2f9eae in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#6  0xaf2fb380 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#7  0xaf3213f4 in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#8  0xb4e2e0e0 in QMetaCallEvent::placeMetaCall(QObject*) ()
   from /usr/lib/libQt5Core.so.5
#9  0xb4e31393 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#10 0xb56b9dba in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#11 0xb56bf491 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#12 0xb75c0da7 in KWin::Application::notify(QObject*, QEvent*) ()
   from /opt/kwin_master/lib/libkdeinit5_kwin.so
#13 0xb4dff3aa in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/libQt5Core.so.5
#14 0xb4e015e4 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#15 0xb4e57264 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#16 0xaf34ed4f in ?? () from /usr/lib/qt/plugins/platforms/libqxcb.so
#17 0xb4dfc7f3 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#18 0xb4dfcc3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Core.so.5
#19 0xb4e04b65 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#20 0xb510ed01 in QGuiApplication::exec() () from /usr/lib/libQt5Gui.so.5
#21 0xb56b8184 in QApplication::exec() () from /usr/lib/libQt5Widgets.so.5
#22 0xb75c2770 in kdemain () from /opt/kwin_master/lib/libkdeinit5_kwin.so
#23 0x08048b1c in main ()
Comment 26 Andrew Crouthamel 2018-11-12 02:43:38 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 27 Andrew Crouthamel 2018-11-21 04:45:29 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 28 David Edmundson 2019-02-27 23:55:40 UTC
If this was still an issue Aleix would have messaged me in the past 4 years.

Also from the description it's the null QScreen issue in XCB which was worked round in Qt5.something.

Closing.