Bug 480964

Summary: XWayland crash while scrolling using mouse after 2024-02-04 update
Product: [KDE Neon] neon Reporter: Flávio Oliveira <flavioagoliveira>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph, erik, jr, nate, neon-bugs-null, sitter, xaver.hugl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Notification of XWayland crashing

Description Flávio Oliveira 2024-02-06 17:28:07 UTC
Created attachment 165622 [details]
Notification of XWayland crashing

SUMMARY
***
The previous Sunday (2024-02-04), I installed some system updates using Discover. First of all, these updates uninstalled Discover for some reason, and I had to install it back. Then, and this is the bug I'm bringing here today, whenever I scroll up or down with my mouse in an application that relies on XWayland, I receive a notification stating that XWayland has crashed (see attachment). Afterwards, any application that uses XWayland either does not open, or is opened with the wrong scaling (usually much smaller than the current scaling that I have at 200%).

This crash only occurs when I use my mouse to scroll an app that uses XWayland. For example, Firefox and system settings work fine. I can also use my touchpad to scroll up and down without issues. If I open the session on Ubuntu (Wayland) or Plasma (X11), the issue does not occur. Thus, it appears to be something specific to the Wayland session on Plasma.

Unfortunately this action does not provide me a crash report, and I'm not tech savvy. But let me know if you know a way to fix this issue.
***


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Yes
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12

ADDITIONAL INFORMATION
My laptop is a Slimbook Executive 14 bought in December 2021
Comment 1 Nate Graham 2024-02-06 20:04:42 UTC
If something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?

Thanks!
Comment 2 Flávio Oliveira 2024-02-06 22:51:14 UTC
(In reply to Nate Graham from comment #1)
> If something crashed, we need a backtrace of it so we can figure out what's
> going on. Can you please attach a backtrace of the crash using the
> coredumpctl command-line program, as detailed in
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl?
> 
> Thanks!

Thank you the feedback, Nate! Unfortunately I got nothing. I crashed an application (in this case Signal), then ran coredumpctl --reverse in the command line... but it just says "No coredumps found".

I tried running Signal using the command line, and crashing it on purpose. But again, same result. Is there anything else I can try?
Comment 3 Nate Graham 2024-02-07 17:39:51 UTC
If coredumpctl isn't working, you can manually run the app in a debugger with `gdb $(which signal)`. Then type `run`. Then make it crash. Then type `bt`. Then when prompted to download debug symbols type `y`. Then when prompted to continue paging, hit `c`. Copy and paste the backtrace into here.

This assumes `signal` is the name of the binary for the app; if it's not, you may need to adjust that appropriately
Comment 4 Flávio Oliveira 2024-02-08 09:37:59 UTC
(In reply to Nate Graham from comment #3)
> If coredumpctl isn't working, you can manually run the app in a debugger
> with `gdb $(which signal)`. Then type `run`. Then make it crash. Then type
> `bt`. Then when prompted to download debug symbols type `y`. Then when
> prompted to continue paging, hit `c`. Copy and paste the backtrace into here.
> 
> This assumes `signal` is the name of the binary for the app; if it's not,
> you may need to adjust that appropriately

Thank you again for your help! But I can't get the debugger to run the app, for some reason. It doesn't open when I press run (but I confirmed it opens if I just type "signal-desktop" without the debugger being running, so the name is correct). Here is the code I get from the command line:

```
mrbig@solenodon:~$ gdb signal-desktop
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from signal-desktop...
(No debugging symbols found in signal-desktop)
(gdb) run
Starting program: /snap/bin/signal-desktop 

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.neon.kde.org/:
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd10ee640 (LWP 6329)]
[New Thread 0x7fffc88ed640 (LWP 6330)]
[New Thread 0x7fffd08ed640 (LWP 6331)]
[New Thread 0x7fffcbfff640 (LWP 6332)]
[New Thread 0x7fffcb7fe640 (LWP 6333)]
[Thread 0x7fffc88ed640 (LWP 6330) exited]
[Thread 0x7fffcb7fe640 (LWP 6333) exited]
[Thread 0x7fffcbfff640 (LWP 6332) exited]
[Thread 0x7fffd08ed640 (LWP 6331) exited]
[Thread 0x7fffd10ee640 (LWP 6329) exited]
process 6325 is executing new program: /snap/snapd/20671/usr/bin/snap
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffd10de640 (LWP 6334)]
[New Thread 0x7fffd08dd640 (LWP 6335)]
[New Thread 0x7fffcbfff640 (LWP 6336)]
[New Thread 0x7fffcb7fe640 (LWP 6337)]
[New Thread 0x7fffcaffd640 (LWP 6338)]
[Detaching after vfork from child process 6339]
[New Thread 0x7fffca7bc640 (LWP 6345)]
[New Thread 0x7fffc9fbb640 (LWP 6346)]
[New Thread 0x7fffc97ba640 (LWP 6347)]
[New Thread 0x7fffc8f79640 (LWP 6348)]
[New Thread 0x7fffa7fff640 (LWP 6349)]
[Thread 0x7fffa7fff640 (LWP 6349) exited]
[Thread 0x7fffc97ba640 (LWP 6347) exited]
[Thread 0x7fffc9fbb640 (LWP 6346) exited]
[Thread 0x7fffca7bc640 (LWP 6345) exited]
[Thread 0x7fffcaffd640 (LWP 6338) exited]
[Thread 0x7fffcb7fe640 (LWP 6337) exited]
[Thread 0x7fffcbfff640 (LWP 6336) exited]
[Thread 0x7fffd08dd640 (LWP 6335) exited]
[Thread 0x7fffd10de640 (LWP 6334) exited]
process 6325 is executing new program: /snap/snapd/20671/usr/lib/snapd/snap-confine
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
need to run as root or suid
[Inferior 1 (process 6325) exited with code 01]
(gdb)
```
Comment 5 Zamundaaa 2024-02-19 22:36:36 UTC
You'd need to debug Xwayland, not the app itself. To do that you'd need to use an ssh session from a different PC though, as halting Xwayland for debugging can sometimes also freeze kwin, so you could never unfreeze it from the same PC.

Before we go there though, if coredumpctl doesn't work, it's likely the issue is caused by an assert, or by a Wayland error.
Those will be visible in the log, so you should check it for a hint about what happened. If you execute
journalctl --user --boot 0 --follow
(and leave it running) and then trigger the Xwayland crash, you should see some message about the crash in the terminal.
Comment 6 Flávio Oliveira 2024-03-02 11:44:05 UTC
Sorry for not responding earlier, I got caught up with work.

I updated to Plasma 6, and this issue got resolved. Thank you for your help and patience!
Comment 7 Erik Boritsch 2024-03-12 09:30:40 UTC
I have similar behaviour on wayland-1.22 with plasma6

E.g. libreoffice crashes when I scroll with the mouse (not with the touchpad though), in the logs I see the following:

XWAYLAND: interface "wl_pointer" has no event 9
Comment 8 Erik Boritsch 2024-03-20 08:42:48 UTC
I had to update following packages from Neon testing to make the error stop:

libwayland-bin libwayland-client0 libwayland-cursor0 libwayland-egl1

They should be included in neon user repository IMO.
Comment 9 Christoph Cullmann 2025-06-23 19:10:26 UTC
I assume this is fixed in the latest version, reading the last comments here.