Bug 472358 - Crash when using stylus input on kwin wayland Qt6
Summary: Crash when using stylus input on kwin wayland Qt6
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland
Depends on:
Blocks:
 
Reported: 2023-07-18 13:51 UTC by Justin Zobel
Modified: 2023-07-26 20:52 UTC (History)
3 users (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 Justin Zobel 2023-07-18 13:51:04 UTC
(gdb) bt
#0  0x00007f12de255377 in KWin::KXcursorTheme::operator==(KWin::KXcursorTheme const&) () at /lib64/libkwin.so.5
#1  0x00007f12de25538d in KWin::KXcursorTheme::operator!=(KWin::KXcursorTheme const&) () at /lib64/libkwin.so.5
#2  0x00007f12de004003 in KWin::ShapeCursorSource::setTheme(KWin::KXcursorTheme const&) () at /lib64/libkwin.so.5
#3  0x00007f12de06e617 in QtPrivate::QFunctorSlotObject<KWin::SurfaceCursor::SurfaceCursor(KWaylandServer::TabletToolV2Interface*)::{lambda(std::variant<KWaylandServer::TabletSurfaceCursorV2*, QByteArray> const&)#1}, 1, QtPrivate::List<std::variant<KWaylandServer::TabletSurfaceCursorV2*, QByteArray> const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    () at /lib64/libkwin.so.5
#4  0x00007f12db1ddcd4 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc6b34c2c0, r=0x55d078ec85a0, this=0x55d078f18390)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#5  doActivate<false>(QObject*, int, void**) (sender=0x55d077e12340, signal_index=3, argv=0x7ffc6b34c2c0) at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#6  0x00007f12de2c0759 in KWaylandServer::TabletToolV2Interface::cursorChanged(std::variant<KWaylandServer::TabletSurfaceCursorV2*, QByteArray> const&) () at /lib64/libkwin.so.5
#7  0x00007f12de2befd8 in KWaylandServer::TabletToolV2Interface::setCurrentSurface(KWaylandServer::SurfaceInterface*) () at /lib64/libkwin.so.5
#8  0x00007f12de062bf0 in KWin::TabletInputFilter::tabletToolEvent(KWin::TabletEvent*) () at /lib64/libkwin.so.5
#9  0x00007f12de12d432 in KWin::TabletInputRedirection::tabletToolEvent(KWin::InputRedirection::TabletEventType, QPointF const&, double, int, int, double, bool, bool, KWin::TabletToolId const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >) () at /lib64/libkwin.so.5
#10 0x00007f12de066f2d in QtPrivate::QSlotObject<void (KWin::TabletInputRedirection::*)(KWin::InputRedirection::TabletEventType, QPointF const&, double, int, int, double, bool, bool, KWin::TabletToolId const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >), QtPrivate::List<KWin::InputRedirection::TabletEventType, QPointF const&, double, int, int, double, bool, bool, KWin::TabletToolId const&, std::chrono::duration<long, std::ratio<1l, 1000000l> > >, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () at /lib64/libkwin.so.5
#11 0x00007f12db1ddb35 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc6b34c700, r=0x55d077985730, this=0x55d077b3e820)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qobjectdefs_impl.h:363
#12 doActivate<false>(QObject*, int, void**) (sender=0x55d077d57320, signal_index=27, argv=0x7ffc6b34c700)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qobject.cpp:3992
#13 0x00007f12ddfe21fb in KWin::InputDevice::tabletToolEvent(KWin::InputRedirection::TabletEventType, QPointF const&, double, int, int, double, bool, bool, KWin::TabletToolId const&, std::chrono::duration<long, std::ratio<1l, 1000000l> >) () at /lib64/libkwin.so.5
#14 0x00007f12de21af0a in KWin::LibInput::Connection::processEvents() () at /lib64/libkwin.so.5
#15 0x00007f12db1cf797 in QObject::event(QEvent*) (this=0x55d0779025d0, e=0x7f129000e0e0) at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qobject.cpp:1391
#16 0x00007f12dc3c0b08 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55d0779025d0, e=0x7f129000e0e0)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/widgets/kernel/qapplication.cpp:3287
#17 0x00007f12db17c308 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55d0779025d0, event=0x7f129000e0e0)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1115
#18 0x00007f12db17c50d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1533
#19 0x00007f12db17fd75 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=data@entry=0x55d07789a870)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qcoreapplication.cpp:1895
#20 0x00007f12db2fcca6 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55d07789fb80, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/kernel/qeventdispatcher_unix.cpp:432
#21 0x00007f12dbf434c2 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/gui/platform/unix/qunixeventdispatcher.cpp:27
#22 0x00007f12db188e93 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc6b34cc60, flags=..., flags@entry=...)
    at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/global/qflags.h:34
#23 0x00007f12db184b3d in QCoreApplication::exec() () at /usr/src/debug/qt6-qtbase-6.5.1-2.fc38.x86_64/src/corelib/global/qflags.h:74
#24 0x000055d075fcc762 in main ()
Comment 1 Nicolas Fella 2023-07-25 17:35:41 UTC
The backtrace suggests you are using a pen, is that correct?
Comment 2 Nate Graham 2023-07-25 18:54:00 UTC
Seems like it. When I try to interact with Firefox using a stylus, I get the same crash. No crash is seen when touching with a finger.
Comment 3 Justin Zobel 2023-07-26 00:56:29 UTC
I was using my fingers. I do have a pen somewhere but I don't use it.
Comment 4 Nate Graham 2023-07-26 15:56:39 UTC
That's interesting. For me, fingers work fine, but a stylus triggers the crash.
Comment 5 Bug Janitor Service 2023-07-26 20:19:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4269
Comment 6 Zamundaaa 2023-07-26 20:52:40 UTC
Git commit 90425f46dbc938e6fda9ff1907f009744e19e7ad by Xaver Hugl.
Committed on 26/07/2023 at 22:42.
Pushed by zamundaaa into branch 'master'.

input: create shape cursor source before using it

M  +3    -0    src/input.cpp

https://invent.kde.org/plasma/kwin/-/commit/90425f46dbc938e6fda9ff1907f009744e19e7ad