Bug 353122 - KWin crashes after pluggin in external monitor, and then hitting CTRL+TAB
Summary: KWin crashes after pluggin in external monitor, and then hitting CTRL+TAB
Status: RESOLVED DUPLICATE of bug 341497
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.3.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-09-24 06:24 UTC by Jeppe Bundsgaard
Modified: 2015-11-05 09:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeppe Bundsgaard 2015-09-24 06:24:34 UTC
Application: kwin_x11 (5.3.2)

Qt Version: 5.4.1
Operating System: Linux 3.19.0-28-generic x86_64
Distribution: Ubuntu 15.04

-- Information about the crash:
- What I was doing when the application crashed:
I plugged in external monitor via HDMI. Then when I need to switch window, I hit CTRL+TAB and kwin crashes...

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fdeca922800 (LWP 1868))]

Thread 3 (Thread 0x7fdeabdbb700 (LWP 1928)):
#0  0x00007fdeca3f9743 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fdec89e7101 in qt_safe_select (nfds=17, fdread=fdread@entry=0x7fdea0000a78, fdwrite=fdwrite@entry=0x7fdea0000d08, fdexcept=fdexcept@entry=0x7fdea0000f98, orig_timeout=orig_timeout@entry=0x0) at kernel/qcore_unix.cpp:75
#2  0x00007fdec89e8cd2 in select (timeout=0x0, exceptfds=0x7fdea0000f98, writefds=0x7fdea0000d08, readfds=0x7fdea0000a78, nfds=<optimized out>, this=0x7fdea00008c0) at kernel/qeventdispatcher_unix.cpp:320
#3  QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7fdea00008e0, flags=..., flags@entry=..., timeout=timeout@entry=0x0) at kernel/qeventdispatcher_unix.cpp:196
#4  0x00007fdec89e9275 in QEventDispatcherUNIX::processEvents (this=0x7fdea00008c0, flags=...) at kernel/qeventdispatcher_unix.cpp:607
#5  0x00007fdec89903e2 in QEventLoop::exec (this=this@entry=0x7fdeabdbada0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007fdec874fb44 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007fdec25a8f65 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007fdec8754b0e in QThreadPrivate::start (arg=0x10ea0c0) at thread/qthread_unix.cpp:337
#9  0x00007fdec9c746aa in start_thread (arg=0x7fdeabdbb700) at pthread_create.c:333
#10 0x00007fdeca402eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fdeaad72700 (LWP 1935)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fdec7558644 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#2  0x00007fdec7558689 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#3  0x00007fdec9c746aa in start_thread (arg=0x7fdeaad72700) at pthread_create.c:333
#4  0x00007fdeca402eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fdeca922800 (LWP 1868)):
[KCrash Handler]
#6  QScreen::handle (this=0x0) at kernel/qscreen.cpp:85
#7  0x00007fdeb4532545 in QXcbWindow::QXcbWindow (this=0x2100c90, window=0x128a730) at qxcbwindow.cpp:260
#8  0x00007fdeb451f5c1 in QXcbIntegration::createPlatformWindow (this=<optimized out>, window=0x128a730) at qxcbintegration.cpp:194
#9  0x00007fdec8ce4786 in QWindowPrivate::create (this=0x128bd20, recursive=recursive@entry=false) at kernel/qwindow.cpp:395
#10 0x00007fdec8ce497b in QWindow::create (this=this@entry=0x128a730) at kernel/qwindow.cpp:539
#11 0x00007fdec8ce4b28 in QWindow::winId (this=0x128a730) at kernel/qwindow.cpp:558
#12 0x00007fdea9a9d9f0 in PlasmaQuick::DialogPrivate::updateInputShape (this=0x17330d0) at ../../../src/plasmaquick/dialog.cpp:542
#13 0x00007fdec89c39c9 in QMetaObject::activate (sender=sender@entry=0x128a730, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=12, argv=argv@entry=0x7ffd30cf3630) at kernel/qobject.cpp:3716
#14 0x00007fdec89c4057 in QMetaObject::activate (sender=sender@entry=0x128a730, m=m@entry=0x7fdec912bb80 <QWindow::staticMetaObject>, local_signal_index=local_signal_index@entry=12, argv=argv@entry=0x7ffd30cf3630) at kernel/qobject.cpp:3582
#15 0x00007fdec8ce41c2 in QWindow::visibleChanged (this=this@entry=0x128a730, _t1=_t1@entry=true) at .moc/moc_qwindow.cpp:710
#16 0x00007fdec8ce74b7 in QWindow::setVisible (this=this@entry=0x128a730, visible=visible@entry=true) at kernel/qwindow.cpp:471
#17 0x00007fdea9a9d8a0 in PlasmaQuick::Dialog::setVisible (this=this@entry=0x128a730, visible=<optimized out>) at ../../../src/plasmaquick/dialog.cpp:1229
#18 0x00007fdea9aa1efa in PlasmaQuick::Dialog::qt_metacall (this=0x128a730, _c=QMetaObject::WriteProperty, _id=9, _a=0x7ffd30cf37a0) at ./moc_dialog.cpp:376
#19 0x00007fdec2520b7f in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#20 0x00007fdec25225fb in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#21 0x00007fdec2522d31 in QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#22 0x00007fdec259751c in QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#23 0x00007fdec2597c7e in QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#24 0x00007fdec2571497 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#25 0x00007fdec250e10c in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#26 0x00007fdec89c3141 in QMetaObject::activate (sender=0x103b060, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3603
#27 0x00007fdec89c4057 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fdeca2f6220 <KWin::TabBox::SwitcherItem::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3582
#28 0x00007fdeca0566d0 in KWin::TabBox::SwitcherItem::visibleChanged (this=<optimized out>) at moc_switcheritem.cpp:244
#29 0x00007fdeca03019f in KWin::TabBox::SwitcherItem::setVisible (this=<optimized out>, visible=visible@entry=true) at ../tabbox/switcheritem.cpp:75
#30 0x00007fdeca033e91 in KWin::TabBox::TabBoxHandlerPrivate::show (this=<optimized out>) at ../tabbox/tabboxhandler.cpp:340
#31 0x00007fdeca034069 in KWin::TabBox::TabBoxHandler::show (this=0xf940a0) at ../tabbox/tabboxhandler.cpp:378
#32 0x00007fdeca0250a6 in KWin::TabBox::TabBox::show (this=<optimized out>) at ../tabbox/tabbox.cpp:736
#33 0x00007fdeca0582c5 in KWin::TabBox::TabBox::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at moc_tabbox.cpp:174
#34 0x00007fdec89c39c9 in QMetaObject::activate (sender=sender@entry=0xfb0668, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3716
#35 0x00007fdec89c4057 in QMetaObject::activate (sender=sender@entry=0xfb0668, m=m@entry=0x7fdec8bed580 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3582
#36 0x00007fdec8a43610 in QTimer::timeout (this=this@entry=0xfb0668) at .moc/moc_qtimer.cpp:192
#37 0x00007fdec89d1918 in QTimer::timerEvent (this=0xfb0668, e=<optimized out>) at kernel/qtimer.cpp:247
#38 0x00007fdec89c46f3 in QObject::event (this=0xfb0668, e=<optimized out>) at kernel/qobject.cpp:1267
#39 0x00007fdec929cb2c in QApplicationPrivate::notify_helper (this=0xea93d0, receiver=0xfb0668, e=0x7ffd30cf41b0) at kernel/qapplication.cpp:3720
#40 0x00007fdec92a2000 in QApplication::notify (this=0x7ffd30cf43f0, receiver=0xfb0668, e=0x7ffd30cf41b0) at kernel/qapplication.cpp:3503
#41 0x00007fdec8992c2b in QCoreApplication::notifyInternal (this=0x7ffd30cf43f0, receiver=0xfb0668, event=event@entry=0x7ffd30cf41b0) at kernel/qcoreapplication.cpp:935
#42 0x00007fdec89eaae5 in sendEvent (event=0x7ffd30cf41b0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228
#43 QTimerInfoList::activateTimers (this=0xedc858) at kernel/qtimerinfo_unix.cpp:635
#44 0x00007fdec89e86a0 in QEventDispatcherUNIX::activateTimers (this=this@entry=0xed9ff0) at kernel/qeventdispatcher_unix.cpp:549
#45 0x00007fdec89e9243 in QEventDispatcherUNIX::processEvents (this=0xed9ff0, flags=flags@entry=...) at kernel/qeventdispatcher_unix.cpp:611
#46 0x00007fdeb457496d in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:62
#47 0x00007fdec89903e2 in QEventLoop::exec (this=this@entry=0x7ffd30cf4310, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#48 0x00007fdec899802c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#49 0x00007fdec8cd731c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1510
#50 0x00007fdec92987a5 in QApplication::exec () at kernel/qapplication.cpp:2956
#51 0x00007fdeca6cb320 in kdemain (argc=1, argv=0x7ffd30cf4558) at ../main_x11.cpp:300
#52 0x00007fdeca31ca40 in __libc_start_main (main=0x4007a0 <main(int, char**)>, argc=1, argv=0x7ffd30cf4558, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd30cf4548) at libc-start.c:289
#53 0x00000000004007d9 in _start ()

Possible duplicates by query: bug 352712, bug 350800, bug 350766, bug 350710, bug 350692.

Reported using DrKonqi
Comment 1 Thomas Lübking 2015-09-24 06:25:46 UTC

*** This bug has been marked as a duplicate of bug 341497 ***
Comment 2 Carsten Pfeiffer 2015-11-05 09:00:23 UTC
Even though this is indeed a duplicate of bug 353122, I'm wondering if isn't possible to add a workaround for this scenario.

Reason: the other crashes appear instantaneously when changing the display configuration where for a short moment no screen is available.

The crash in this report may happen way later, when the screen configuration is all well. I suppose that something in the Alt-Tab box is cached from the previous display configuration, which becomes invalid later, leading to the crash.

Is it possible to detect that situation and simply discard and recreate the invalid objects when pressing Alt-Tab?
Comment 3 Thomas Lübking 2015-11-05 09:10:03 UTC
> The crash in this report may happen way later, when the screen configuration is all well.

The QXcbWindow::screen() on the *just created* QXcbWindow is 0x0, there's no chance to workaround that from KWin or anything else (likely because the applications primary screen is "still" 0x0)
The 0x0 screen is a major issue that pops up all over the Qt5 code (so it's indeed likely not an exact dupe, but the upstream bug also groups all bugs itr.)