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

            Bug ID: 529060
           Summary: kwin_wayland crashes in
                    KWin::InputRedirection::syncTabletWithMouse() if a
                    mouse motion event is processed during startup
    Classification: Plasma
           Product: kwin
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

***
If you're not sure this is actually a bug or valid feature request, instead
post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Do not paste LLM output.

Please remove this comment after reading and before submitting - thanks!
***

DESCRIPTION
SUMMARY
`kwin_wayland` 6.8.3 crashes with SIGSEGV during session startup inside
`KWin::InputRedirection::syncTabletWithMouse()` when a standard mouse generates
a motion event while `setupInputBackends()` is still initializing.

No drawing tablet, touchscreen, or virtual input remapping tools are
connected—only a regular mouse.

STEPS TO REPRODUCE
1. Log into a KDE Plasma 6.8.3 Wayland session.
2. Move the mouse (or have a mouse emit a motion/wake event) at the exact
moment `kwin_wayland` is initializing input backends during
`ApplicationWayland::performStartup()`.

OBSERVED RESULT
`kwin_wayland` crashes immediately at startup with a segmentation fault in
`KWin::InputRedirection::syncTabletWithMouse()` (presumably because `m_tablet`
/ tablet input redirection has not been initialized yet when
`LibInput::Connection::processEvents()` flushes early pointer motion events
during `setupInputBackends()`).

EXPECTED RESULT
`kwin_wayland` should safely ignore tablet syncing during early startup before
tablet input redirection is instantiated, or defer processing `libinput` events
until all input redirection handlers are constructed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 45 (x86_64)
KDE Plasma Version: 6.8.3 (`kwin-6.8.3-1.fc45`)
Mesa Version: 26.2.6 (`mesa-26.2.6-1.fc45`)
libdrm Version: 2.4.134 (`libdrm-2.4.134-2.fc45`)

BACKTRACE
#0  0x00007fd7d5ef1cec __pthread_kill_implementation (libc.so.6 + 0xefcec)
#1  0x00007fd7d5e95f4e raise (libc.so.6 + 0x93f4e)
#2  0x00007fd7d9ea8ed4 _ZN6KCrash19defaultCrashHandlerEi (libKF6Crash.so.6 +
0x9ed4)
#3  0x00007fd7d5e96070 __restore_rt (libc.so.6 + 0x94070)
#4  0x00007fd7d98a5194 _ZNK4KWin16InputRedirection19syncTabletWithMouseEv
(libkwin.so.6 + 0x4a5194)
#5  0x00007fd7d994d344
_ZN4KWin23PointerInputRedirection13processMotionERK7QPointFS3_NSt6chrono8durationIlSt5ratioILl1ELl1000000EEEEPNS_11InputDeviceE
(libkwin.so.6 + 0x54d344)
#6  0x00007fd7d67faa37 _Z10doActivateILb0EEvP7QObjectiPPv (libQt6Core.so.6 +
0x3faa37)
#7  0x00007fd7d97b0768
_ZN4KWin11InputDevice13pointerMotionERK7QPointFS3_NSt6chrono8durationIlSt5ratioILl1ELl1000000EEEEPS0_
(libkwin.so.6 + 0x3b0768)
#8  0x00007fd7d9b46e12 _ZN4KWin8LibInput10Connection13processEventsEv
(libkwin.so.6 + 0x746e12)
#9  0x00007fd7d98a76e3
_ZN4KWin16InputRedirection15addInputBackendEOSt10unique_ptrINS_12InputBackendESt14default_deleteIS2_EE
(libkwin.so.6 + 0x4a76e3)
#10 0x00007fd7d98a78cf _ZN4KWin16InputRedirection18setupInputBackendsEv
(libkwin.so.6 + 0x4a78cf)
#11 0x00007fd7d98a0155 _ZN4KWin16InputRedirectionC2EP7QObject (libkwin.so.6 +
0x4a0155)
#12 0x00007fd7d98a0229 _ZN4KWin16InputRedirection6createEP7QObject
(libkwin.so.6 + 0x4a0229)
#13 0x00007fd7d98e31cd _ZN4KWin11Application11createInputEv (libkwin.so.6 +
0x4e31cd)
#14 0x00005631577f8161 _ZN4KWin18ApplicationWayland14performStartupEv
(kwin_wayland + 0x94161)
#15 0x00007fd7d98dd2c4 _ZN4KWin11Application5startEv (libkwin.so.6 + 0x4dd2c4)
#16 0x00005631577eda51 main (kwin_wayland + 0x89a51)
#17 0x00007fd7d5e7f301 __libc_start_call_main (libc.so.6 + 0x7d301)
#18 0x00007fd7d5e7f418 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x7d418)
#19 0x00005631577f2135 _start (kwin_wayland + 0x8e135)


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


ESA-INTEL: warning: Haswell Vulkan support is incomplete
Operating System: Fedora Linux 45
KDE Plasma Version: 6.8.3
KDE Frameworks Version: 6.32.0
Qt Version: 6.11.2
Kernel Version: 7.3.4-300.fc45.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4300M CPU @ 2.60GHz
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: Intel® HD Graphics 4600


ADDITIONAL INFORMATION

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

Reply via email to