Bug 427749 - kwin_wayland crash, easily repro when using QDrag
Summary: kwin_wayland crash, easily repro when using QDrag
Status: RESOLVED FIXED
Alias: None
Product: kwayland
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 10:53 UTC by Sergio Martins
Modified: 2021-07-11 23:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test-case (611 bytes, text/x-c++src)
2020-10-15 10:53 UTC, Sergio Martins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Martins 2020-10-15 10:53:41 UTC
Created attachment 132381 [details]
test-case

If we hide() our widget inside QWidget::dragEnterEvent(), then the wayland server will crash. 

See attached main.cpp
$ qmake QT+=widgets
$ make && ./testc

Press the button, without releasing mouse. Move mouse over the other window.
Crashes with the following backtrace

(gdb) bt
#0  0x00007fbb0ba2bc94 in KWaylandServer::SurfaceInterface::buffer() () at /usr/lib/libKWaylandServer.so.5
#1  0x00007fbb0bf38172 in  () at /usr/lib/libkwin.so.5
#2  0x00007fbb0a7de036 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007fbb0a7de036 in  () at /usr/lib/libQt5Core.so.5
#4  0x00007fbb0ba16103 in KWaylandServer::PointerInterface::Private::setCursor(unsigned int, KWaylandServer::SurfaceInterface*, QPoint const&) () at /usr/lib/libKWaylandServer.so.5
#5  0x00007fbb0ba162bf in KWaylandServer::PointerInterface::Private::setCursorCallback(wl_client*, wl_resource*, unsigned int, wl_resource*, int, int) () at /usr/lib/libKWaylandServer.so.5
#6  0x00007fbb0777ca8d in  () at /usr/lib/libffi.so.7
#7  0x00007fbb0777c01b in  () at /usr/lib/libffi.so.7
#8  0x00007fbb08b64f62 in  () at /usr/lib/libwayland-server.so.0
#9  0x00007fbb08b612dc in  () at /usr/lib/libwayland-server.so.0
#10 0x00007fbb08b62faa in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#11 0x00007fbb0b9f4bf0 in KWaylandServer::Display::Private::dispatch() () at /usr/lib/libKWaylandServer.so.5
#12 0x00007fbb0a7de036 in  () at /usr/lib/libQt5Core.so.5
#13 0x00007fbb0a7e15a0 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#14 0x00007fbb0a7e1dad in QSocketNotifier::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#15 0x00007fbb0b26e752 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x00007fbb0a7a6cda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#17 0x00007fbb0a7fcc34 in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at /usr/lib/libQt5Core.so.5
#18 0x00007fbb0a7fd0b5 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#19 0x00007fbb0c12e91e in  () at /usr/lib/qt/plugins/platforms/KWinQpaPlugin.so
#20 0x00007fbb0a7a565c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#21 0x00007fbb0a7adaf4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#22 0x000055be3656884e in  ()
#23 0x00007fbb0a01a152 in __libc_start_main () at /usr/lib/libc.so.6
#24 0x000055be365690de in _start ()


I don't have a devel env to get debug symbols, but hopefully the test-case is enough.




Linux/KDE Plasma: Archlinux, plasma 5.20
KDE Plasma Version: 5.20
Qt Version: 5.15.1