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..
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. sysdeps/ unix/sysv/ linux/raise. c:56 sysdeps/ unix/sysv/ linux/raise. c: Bestand of map bestaat niet. sysdeps/ unix/sysv/ linux/raise. c:56 :__verbose_ terminate_ handler( ) () from /usr/lib/ x86_64- linux-gnu/ libstdc+ +.so.6 x86_64- linux-gnu/ libstdc+ +.so.6 x86_64- linux-gnu/ libstdc+ +.so.6 x86_64- linux-gnu/ libstdc+ +.so.6 ::physicalSize (this=<optimized out>) at kernel/ qplatformscreen .cpp:139 :physicalSize (this=this@ entry=0x6620c0) at kernel/ qscreen. cpp:243 :physicalDotsPe rInch (this=this@ entry=0x6620c0) at kernel/ qscreen. cpp:166 ached:: screenChanged (this=0x2e16f20, screen=0x6621b0) at items/qquickscr een.cpp: 315 :activate (sender= sender@ entry=0x7ffffff fe7b0, signalOffset= <optimized out>, local_signal_ index=local_ signal_ index@entry= 0, argv=argv@ entry=0x7ffffff fd9a0) at kernel/ qobject. cpp:3680 :activate (sender= sender@ entry=0x7ffffff fe7b0, m=m@entry= 0x7ffff65125c0 <QWindow: :staticMetaObje ct>, local_signal_ index=local_ signal_ index@entry= 0, argv=argv@ entry=0x7ffffff fd9a0) at kernel/ qobject. cpp:3546 :screenChanged (this=this@ entry=0x7ffffff fe7b0, _t1=_t1@ entry=0x6621b0) at .moc/moc_ qwindow. cpp:623 :setScreen (this=0x8aa3a0, newScreen=0x6621b0, recreate=<optimized out>) at kernel/ qwindow. cpp:372 :screenDestroye d (this=0x7ffffff fe7b0, object=<optimized out>) at kernel/ qwindow. cpp:1637 :activate (sender= sender@ entry=0x6620c0, signalOffset= <optimized out>, local_signal_ index=local_ signal_ index@entry= 0, argv=argv@ entry=0x7ffffff fdb60) at kernel/ qobject. cpp:3680 :activate (sender= sender@ entry=0x6620c0, m=m@entry= 0x7ffff5e1bf20 <QObject: :staticMetaObje ct>, local_signal_ index=local_ signal_ index@entry= 0, argv=argv@ entry=0x7ffffff fdb60) at kernel/ qobject. cpp:3546 entry=0x6620c0, _t1=_t1@ entry=0x6620c0) at .moc/moc_ qobject. cpp:202 <optimized out>) at kernel/ qobject. cpp:901 <optimized out>) at .moc/.. /kernel/ qscreen. h:64 <optimized out>) at .moc/.. /kernel/ qscreen. h:64 ::~QPlatformScr een (this=0x65b8e0, __in_chrg= <optimized out>) at kernel/ qplatformscreen .cpp:65 :~QXcbScreen (this=0x65b8e0, __in_chrg= <optimized out>) at qxcbscreen.cpp:209 :updateScreens (this=this@ entry=0x6492b0) at qxcbconnection. cpp:258 :handleXcbEvent (this=this@ entry=0x6492b0, event=event@ entry=0x7fffe40 03490) at qxcbconnection. cpp:928 :processXcbEven ts (this=0x6492b0) at qxcbconnection. cpp:1232 qobject. cpp:1241 vate::notify_ helper (this=this@ entry=0x63cce0, receiver= receiver@ entry=0x6492b0, e=e@entry= 0x7fffe4004260) at kernel/ qapplication. cpp:3504 :notify (this=0x7ffffff fe750, receiver=0x6492b0, e=0x7fffe4004260) at kernel/ qapplication. cpp:3287 n::notifyIntern al (this=0x7ffffff fe750, receiver=0x6492b0, event=event@ entry=0x7fffe40 04260) at kernel/ qcoreapplicatio n.cpp:935 0x7fffe4004260, receiver=<optimized out>) at ../../include/ QtCore/ ../../src/ corelib/ kernel/ qcoreapplicatio n.h:237 nPrivate: :sendPostedEven ts (receiver= receiver@ entry=0x0, event_type= event_type@ entry=0, data=0x63ce40) at kernel/ qcoreapplicatio n.cpp:1539 n::sendPostedEv ents (receiver= receiver@ entry=0x0, event_type= event_type@ entry=0) at kernel/ qcoreapplicatio n.cpp:1397 Dispatch (s=0x6ca730) at kernel/ qeventdispatche r_glib. cpp:279 context_ dispatch () from /lib/x86_ 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0 context_ iteration () from /lib/x86_ 64-linux- gnu/libglib- 2.0.so. 0 rGlib:: processEvents (this=0x6bcbc0, flags=...) at kernel/ qeventdispatche r_glib. cpp:426 entry=0x7ffffff fe540, flags=..., flags@entry=...) at kernel/ qeventloop. cpp:212 n::exec () at kernel/ qcoreapplicatio n.cpp:1188 e9c8, init=<optimized out>, fini=<optimized out>, rtld_fini= <optimized out>, stack_end= 0x7fffffffe9b8) at libc-start.c:287
0x00007ffff4e4c117 in __GI_raise (sig=sig@entry=6) at ../nptl/
56 ../nptl/
(gdb) bt
#0 0x00007ffff4e4c117 in __GI_raise (sig=sig@entry=6) at ../nptl/
#1 0x00007ffff4e4d808 in __GI_abort () at abort.c:89
#2 0x00007ffff5453285 in __gnu_cxx:
#3 0x00007ffff54510f6 in ?? () from /usr/lib/
#4 0x00007ffff5451141 in std::terminate() () from /usr/lib/
#5 0x00007ffff5451c8f in __cxa_pure_virtual () from /usr/lib/
#6 0x00007ffff5ef6efa in QPlatformScreen
#7 0x00007ffff5f30772 in QScreen:
#8 0x00007ffff5f30819 in QScreen:
#9 0x00007ffff78343d2 in QQuickScreenAtt
#10 0x00007ffff59f391e in QMetaObject:
#11 0x00007ffff59f3dd7 in QMetaObject:
#12 0x00007ffff5f0b78f in QWindow:
#13 0x00007ffff5f0e160 in QWindowPrivate:
#14 0x00007ffff5f0e2e2 in QWindow:
#15 0x00007ffff59f391e in QMetaObject:
#16 0x00007ffff59f3dd7 in QMetaObject:
#17 0x00007ffff59f3e6f in QObject::destroyed (this=this@
#18 0x00007ffff59fb308 in QObject::~QObject (this=0x6620c0, __in_chrg=
#19 0x00007ffff624faf7 in ~QScreen (this=0x6620c0, __in_chrg=
#20 QScreen::~QScreen (this=0x6620c0, __in_chrg=
#21 0x00007ffff5ef70aa in QPlatformScreen
#22 0x00007fffedf51a99 in QXcbScreen:
#23 0x00007fffedf4511b in QXcbConnection:
#24 0x00007fffedf45815 in QXcbConnection:
#25 0x00007fffedf46a0b in QXcbConnection:
#26 0x00007ffff59f45b6 in QObject::event (this=0x6492b0, e=<optimized out>) at kernel/
#27 0x00007ffff68e66dc in QApplicationPri
#28 0x00007ffff68eb456 in QApplication:
#29 0x00007ffff59c49d5 in QCoreApplicatio
#30 0x00007ffff59c6827 in sendEvent (event=
#31 QCoreApplicatio
#32 0x00007ffff59c6e58 in QCoreApplicatio
#33 0x00007ffff5a1c243 in postEventSource
#34 0x00007ffff3beade4 in g_main_
#35 0x00007ffff3beb028 in ?? () from /lib/x86_
#36 0x00007ffff3beb0cc in g_main_
#37 0x00007ffff5a1b6bc in QEventDispatche
#38 0x00007ffff59c28eb in QEventLoop::exec (this=this@
#39 0x00007ffff59c9f46 in QCoreApplicatio
#40 0x00000000004082f5 in ?? ()
#41 0x00007ffff4e36ec5 in __libc_start_main (main=0x407b60, argc=1, argv=0x7fffffff
#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..