Comment 42 for bug 1318584

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

On utopic when I disable the active screen I get the following backtrace:

pure virtual method called
terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007ffff4e4c117 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: Bestand of map bestaat niet.
(gdb) bt
#0 0x00007ffff4e4c117 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff4e4d808 in __GI_abort () at abort.c:89
#2 0x00007ffff5453285 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff54510f6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff5451141 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff5451c8f in __cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff5ef6efa in QPlatformScreen::physicalSize (this=<optimized out>) at kernel/qplatformscreen.cpp:139
#7 0x00007ffff5f30772 in QScreen::physicalSize (this=this@entry=0x6620c0) at kernel/qscreen.cpp:243
#8 0x00007ffff5f30819 in QScreen::physicalDotsPerInch (this=this@entry=0x6620c0) at kernel/qscreen.cpp:166
#9 0x00007ffff78343d2 in QQuickScreenAttached::screenChanged (this=0x2e16f20, screen=0x6621b0) at items/qquickscreen.cpp:315
#10 0x00007ffff59f391e in QMetaObject::activate (sender=sender@entry=0x7fffffffe7b0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd9a0) at kernel/qobject.cpp:3680
#11 0x00007ffff59f3dd7 in QMetaObject::activate (sender=sender@entry=0x7fffffffe7b0, m=m@entry=0x7ffff65125c0 <QWindow::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffd9a0) at kernel/qobject.cpp:3546
#12 0x00007ffff5f0b78f in QWindow::screenChanged (this=this@entry=0x7fffffffe7b0, _t1=_t1@entry=0x6621b0) at .moc/moc_qwindow.cpp:623
#13 0x00007ffff5f0e160 in QWindowPrivate::setScreen (this=0x8aa3a0, newScreen=0x6621b0, recreate=<optimized out>) at kernel/qwindow.cpp:372
#14 0x00007ffff5f0e2e2 in QWindow::screenDestroyed (this=0x7fffffffe7b0, object=<optimized out>) at kernel/qwindow.cpp:1637
#15 0x00007ffff59f391e in QMetaObject::activate (sender=sender@entry=0x6620c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffdb60) at kernel/qobject.cpp:3680
#16 0x00007ffff59f3dd7 in QMetaObject::activate (sender=sender@entry=0x6620c0, m=m@entry=0x7ffff5e1bf20 <QObject::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffdb60) at kernel/qobject.cpp:3546
#17 0x00007ffff59f3e6f in QObject::destroyed (this=this@entry=0x6620c0, _t1=_t1@entry=0x6620c0) at .moc/moc_qobject.cpp:202
#18 0x00007ffff59fb308 in QObject::~QObject (this=0x6620c0, __in_chrg=<optimized out>) at kernel/qobject.cpp:901
#19 0x00007ffff624faf7 in ~QScreen (this=0x6620c0, __in_chrg=<optimized out>) at .moc/../kernel/qscreen.h:64
#20 QScreen::~QScreen (this=0x6620c0, __in_chrg=<optimized out>) at .moc/../kernel/qscreen.h:64
#21 0x00007ffff5ef70aa in QPlatformScreen::~QPlatformScreen (this=0x65b8e0, __in_chrg=<optimized out>) at kernel/qplatformscreen.cpp:65
#22 0x00007fffedf51a99 in QXcbScreen::~QXcbScreen (this=0x65b8e0, __in_chrg=<optimized out>) at qxcbscreen.cpp:209
#23 0x00007fffedf4511b in QXcbConnection::updateScreens (this=this@entry=0x6492b0) at qxcbconnection.cpp:258
#24 0x00007fffedf45815 in QXcbConnection::handleXcbEvent (this=this@entry=0x6492b0, event=event@entry=0x7fffe4003490) at qxcbconnection.cpp:928
#25 0x00007fffedf46a0b in QXcbConnection::processXcbEvents (this=0x6492b0) at qxcbconnection.cpp:1232
#26 0x00007ffff59f45b6 in QObject::event (this=0x6492b0, e=<optimized out>) at kernel/qobject.cpp:1241
#27 0x00007ffff68e66dc in QApplicationPrivate::notify_helper (this=this@entry=0x63cce0, receiver=receiver@entry=0x6492b0, e=e@entry=0x7fffe4004260) at kernel/qapplication.cpp:3504
#28 0x00007ffff68eb456 in QApplication::notify (this=0x7fffffffe750, receiver=0x6492b0, e=0x7fffe4004260) at kernel/qapplication.cpp:3287
#29 0x00007ffff59c49d5 in QCoreApplication::notifyInternal (this=0x7fffffffe750, receiver=0x6492b0, event=event@entry=0x7fffe4004260) at kernel/qcoreapplication.cpp:935
#30 0x00007ffff59c6827 in sendEvent (event=0x7fffe4004260, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
#31 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x63ce40) at kernel/qcoreapplication.cpp:1539
#32 0x00007ffff59c6e58 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1397
#33 0x00007ffff5a1c243 in postEventSourceDispatch (s=0x6ca730) at kernel/qeventdispatcher_glib.cpp:279
#34 0x00007ffff3beade4 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff3beb028 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff3beb0cc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffff5a1b6bc in QEventDispatcherGlib::processEvents (this=0x6bcbc0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#38 0x00007ffff59c28eb in QEventLoop::exec (this=this@entry=0x7fffffffe540, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#39 0x00007ffff59c9f46 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188
#40 0x00000000004082f5 in ?? ()
#41 0x00007ffff4e36ec5 in __libc_start_main (main=0x407b60, argc=1, argv=0x7fffffffe9c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe9b8) at libc-start.c:287
#42 0x0000000000409eff in ?? ()

Observe that at #22 ~QXcbScreen is called, so the platform screen is being destroyed. This explains why it's calling a pure virtual method (on the old, now destroyed screen), because virtual methods shouldn't be called from constructors or destructors.

The screen changed presumably has to be called BEFORE the qscreen is deleted, that should fix this bug.

Now RAOF has hit another bug, no idea yet about that..