https://bugs.kde.org/show_bug.cgi?id=489072

--- Comment #2 from Arsen Arsenović <ar...@aarsen.me> ---
Created attachment 170882
  --> https://bugs.kde.org/attachment.cgi?id=170882&action=edit
WAYLAND_DEBUG=1 logs from KRunner just before the crash

KRunner backtrace:

#0  QPlatformScreen::screen (this=this@entry=0x0) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/gui/kernel/qplatformscreen.cpp:115
#1  0x00007ffff4aca191 in QtWaylandClient::QWaylandWindow::handleScreensChanged
(this=0x555556a7b830) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylandwindow.cpp:1410
#2  0x00007ffff59e9ab5 in QtPrivate::QSlotObjectBase::call
(this=0x555555ae6ed0, r=<optimized out>, a=0x7fffffffc2b8) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#3  doActivate<false> (sender=0x555555b08c50, signal_index=3,
argv=0x7fffffffc2b8) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#4  0x00007ffff59e9ab5 in QtPrivate::QSlotObjectBase::call
(this=0x555555b037e0, r=<optimized out>, a=0x7fffffffc400) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#5  doActivate<false> (sender=0x7fffffffcd70, signal_index=9,
argv=0x7fffffffc400) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#6  0x00007ffff59a1857 in QMetaObject::activate (sender=<optimized out>,
m=m@entry=0x7ffff66a1ca0 <QGuiApplication::staticMetaObject>,
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffc400)
at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#7  0x00007ffff5f351b6 in QGuiApplication::screenAdded (this=<optimized out>,
_t1=<optimized out>) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2_build/src/gui/Gui_autogen/include/moc_qguiapplication.cpp:421
#8  0x00007ffff5fabb5e in QWindowSystemInterface::handleScreenAdded
(platformScreen=<optimized out>, isPrimary=isPrimary@entry=false) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/gui/kernel/qwindowsysteminterface.cpp:727
#9  0x00007ffff4aeeafd in
QtWaylandClient::QWaylandDisplay::handleScreenInitialized (this=0x5555555a4d30,
screen=<optimized out>, screen@entry=0x7fffdc005e10) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylanddisplay.cpp:601
#10 0x00007ffff4aeece3 in QtWaylandClient::QWaylandScreen::maybeInitialize
(this=0x7fffdc005e10) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylandscreen.cpp:74
#11 QtWaylandClient::QWaylandScreen::maybeInitialize (this=0x7fffdc005e10) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylandscreen.cpp:65
#12 0x00007ffff366d38a in ffi_call_unix64 () at
/usr/src/debug/dev-libs/libffi-3.4.6/libffi-3.4.6/src/x86/unix64.S:104
#13 0x00007ffff3669481 in ffi_call_int (cif=cif@entry=0x7fffffffc600,
fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>,
closure=closure@entry=0x0) at
/usr/src/debug/dev-libs/libffi-3.4.6/libffi-3.4.6/src/x86/ffi64.c:673
#14 0x00007ffff366c746 in ffi_call (cif=cif@entry=0x7fffffffc600, fn=<optimized
out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffc6d0) at
/usr/src/debug/dev-libs/libffi-3.4.6/libffi-3.4.6/src/x86/ffi64.c:710
#15 0x00007ffff518303f in wl_closure_invoke
(closure=closure@entry=0x7fffe00025b0, target=target@entry=0x5555555b24b0,
opcode=opcode@entry=2, data=<optimized out>, flags=1) at
../wayland-1.23.0/src/connection.c:1228
#16 0x00007ffff5183889 in dispatch_event (display=display@entry=0x5555555a4f60,
queue=queue@entry=0x5555555a5058) at
../wayland-1.23.0/src/wayland-client.c:1670
#17 0x00007ffff5183c63 in dispatch_queue (display=0x5555555a4f60,
queue=0x5555555a5058) at ../wayland-1.23.0/src/wayland-client.c:1816
#18 wl_display_dispatch_queue_pending (display=0x5555555a4f60,
queue=0x5555555a5058) at ../wayland-1.23.0/src/wayland-client.c:2058
#19 0x00007ffff4adefd5 in QtWaylandClient::EventThread::dispatchQueuePending
(this=<optimized out>) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylanddisplay.cpp:227
#20 QtWaylandClient::EventThread::readAndDispatchEvents (this=<optimized out>)
at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylanddisplay.cpp:109
#21 QtWaylandClient::EventThread::readAndDispatchEvents (this=<optimized out>)
at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylanddisplay.cpp:94
#22 QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>) at
/usr/src/debug/dev-qt/qtwayland-6.7.2/qtwayland-everywhere-src-6.7.2/src/client/qwaylanddisplay.cpp:503
#23 0x00007ffff597d6cb in QObject::event (this=0x5555555a4d30,
e=0x7fffe00019f0) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1452
#24 0x00007ffff6e44535 in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x5555555a4d30, e=0x7fffe00019f0) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:3287
#25 0x00007ffff5a02658 in QCoreApplication::notifyInternal2
(receiver=0x5555555a4d30, event=0x7fffe00019f0) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1142
#26 0x00007ffff5a0270d in QCoreApplication::sendEvent (receiver=<optimized
out>, event=<optimized out>) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1583
#27 0x00007ffff5a2d7fd in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x5555555994c0) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1940
#28 0x00007ffff5a2da6c in QCoreApplication::sendPostedEvents
(receiver=<optimized out>, event_type=<optimized out>) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1797
#29 0x00007ffff578b0f7 in postEventSourceDispatch (s=0x5555555a1a70) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#30 0x00007ffff41df335 in g_main_dispatch (context=0x7fffe8000ef0) at
../glib-2.78.6/glib/gmain.c:3476
#31 0x00007ffff424b618 in g_main_context_dispatch_unlocked
(context=0x7fffe8000ef0) at ../glib-2.78.6/glib/gmain.c:4284
#32 g_main_context_iterate_unlocked.isra.0 (context=0x7fffe8000ef0,
block=<optimized out>, dispatch=1, self=<optimized out>) at
../glib-2.78.6/glib/gmain.c:4349
#33 0x00007ffff41de650 in g_main_context_iteration (context=0x7fffe8000ef0,
may_block=1) at ../glib-2.78.6/glib/gmain.c:4414
#34 0x00007ffff5788ee3 in QEventDispatcherGlib::processEvents
(this=0x5555555b5a70, flags=...) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#35 0x00007ffff5a3411a in QEventLoop::exec (this=this@entry=0x7fffffffcc40,
flags=..., flags@entry=...) at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:34
#36 0x00007ffff5a34538 in QCoreApplication::exec () at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/corelib/global/qflags.h:74
#37 0x00007ffff5f36590 in QGuiApplication::exec () at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/gui/kernel/qguiapplication.cpp:1926
#38 0x00007ffff6d9f309 in QApplication::exec () at
/usr/src/debug/dev-qt/qtbase-6.7.2/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:2555
#39 0x000055555555def3 in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/kde-plasma/plasma-workspace-6.1.0/plasma-workspace-6.1.0/krunner/main.cpp:147

In the handleScreensChanged function, newScreen is a null pointer at this
point:

     1406 void QWaylandWindow::handleScreensChanged()
     1407 {
     1408     QPlatformScreen *newScreen = calculateScreenFromSurfaceEvents();
     1409
  >  1410     if (newScreen->screen() == window()->screen())
     1411         return;
     1412
     1413     QWindowSystemInterface::handleWindowScreenChanged(window(),
newScreen->QPlatformScreen::screen());
     1414
     1415     if (fixedToplevelPositions && !QPlatformWindow::parent() &&
window()->type() != Qt::Popup
     1416         && window()->type() != Qt::ToolTip
     1417         && geometry().topLeft() != newScreen->geometry().topLeft()) {
     1418         auto geometry = this->geometry();
     1419         geometry.moveTo(newScreen->geometry().topLeft());
     1420         setGeometry(geometry);
     1421     }
     1422
     1423     updateScale();
     1424     updateBufferTransform();
     1425 }

... as mSurface->oldestEnteredScreen and QPlatformWindow::screen are both null
pointers at that point.  Also, 

(gdb) p mSurface.d->m_screens.d.size
$33 = 0
(gdb) 

... where mSurface is the member in QWaylandWindow (checked during the
execution of QWaylandWindow::calculateScreenFromSurfaceEvents)

I re-ran this with WAYLAND_DEBUG=1.  Log attached.  There might be a long pause
in it due to a breakpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to