Bug 450338 - KWin asserts in SeatInterface::notifyTouchMotion
Summary: KWin asserts in SeatInterface::notifyTouchMotion
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: git master
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-15 19:54 UTC by Nicolas Fella
Modified: 2022-02-21 14:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2022-02-15 19:54:19 UTC
SUMMARY
KWin on the PinePhone (Manjaro ARM dev) somewhat randomly asserts:
ASSERT: "d->globalTouch.ids.contains(id)" in file /build/kwayland-server/src/kwayland-server/src/server/seat_interface.cpp, line 1075

#0  0x0000ffffa52c4af8 in raise () at /usr/lib/libc.so.6
#1  0x0000ffffa52b14f0 in abort () at /usr/lib/libc.so.6
#2  0x0000ffffa5a11eb8 in qErrnoWarning(char const*, ...) () at /usr/lib/libQt5Core.so.5
#3  0x0000ffffa5a11680 in qt_assert_x(char const*, char const*, char const*, int) () at /usr/lib/libQt5Core.so.5
#4  0x0000ffffa677f608 in KWaylandServer::SeatInterface::notifyTouchMotion(int, QPointF const&) () at /usr/lib/libKWaylandServer.so.5
#5  0x0000ffffa8392c90 in  () at /usr/lib/libkwin.so.5
#6  0x0000ffffa846cb9c in  () at /usr/lib/libkwin.so.5
#7  0x0000ffffa846be50 in  () at /usr/lib/libkwin.so.5
#8  0x0000ffffa5caa060 in  () at /usr/lib/libQt5Core.so.5
#9  0x0000ffffa82be64c in KWin::InputDevice::touchMotion(int, QPointF const&, unsigned int, KWin::InputDevice*) () at /usr/lib/libkwin.so.5
#10 0x0000ffffa8501f0c in KWin::LibInput::Connection::processEvents() () at /usr/lib/libkwin.so.5
#11 0x0000ffffa5c9f47c in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#12 0x0000ffffa6a64f5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x0000ffffa5c67910 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#14 0x0000ffffa5c6b460 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#15 0x0000ffffa5cd0cb8 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#16 0x0000aaaaeabb92ac in  ()
#17 0x0000ffffa5c65a74 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#18 0x0000ffffa5c7026c in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#19 0x0000aaaaeaa78118 in  ()
#20 0x0000ffffa52b1754 in __libc_start_main () at /usr/lib/libc.so.6
#21 0x0000aaaaeaa7b378 in  ()
Comment 1 Nicolas Fella 2022-02-15 19:55:16 UTC
Sorry about the lack of debug symbols. I can get them if needed
Comment 2 Aleix Pol 2022-02-19 21:28:16 UTC
is it possible that it happens when you wake up the device by tapping on the screen?
Comment 3 Nicolas Fella 2022-02-19 21:44:46 UTC
yes, that's very possible. It's definitely related to wakeup somehow
Comment 4 Bug Janitor Service 2022-02-19 22:10:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwayland-server/-/merge_requests/352
Comment 5 Aleix Pol 2022-02-21 14:03:49 UTC
Git commit 073058c90c5d8b3170a4a2dcb8ed66f263ccd98f by Aleix Pol.
Committed on 21/02/2022 at 03:08.
Pushed by apol into branch 'master'.

seat: Do not assert on corner touch cases

Consider the cases where we get a touch move or touch up but we never
received a touch down before.

In the case of move, we'll simulate a touchDown right there and move on
with reality.
In the case of touch up, we'll just ignore the event as simulating could
just be more confusing.

M  +15   -4    src/server/seat_interface.cpp

https://invent.kde.org/plasma/kwayland-server/commit/073058c90c5d8b3170a4a2dcb8ed66f263ccd98f
Comment 6 Aleix Pol 2022-02-21 14:04:14 UTC
Git commit a9f7072f7510e543d47b84ef69be99e58f2fea63 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 21/02/2022 at 14:04.
Pushed by apol into branch 'Plasma/5.24'.

seat: Do not assert on corner touch cases

Consider the cases where we get a touch move or touch up but we never
received a touch down before.

In the case of move, we'll simulate a touchDown right there and move on
with reality.
In the case of touch up, we'll just ignore the event as simulating could
just be more confusing.


(cherry picked from commit 073058c90c5d8b3170a4a2dcb8ed66f263ccd98f)

M  +15   -4    src/server/seat_interface.cpp

https://invent.kde.org/plasma/kwayland-server/commit/a9f7072f7510e543d47b84ef69be99e58f2fea63