Eraser crashes rnote
Describe the bug
Rnote crashes when tapping on the screen with stylus in eraser mode.
To Reproduce
Steps to reproduce the behavior:
- Hold down the button on the stylus which switches it to eraser mode.
- Tap on the screen and move it away (out of tracking range) repeatedly. (usually only takes 1-2 tries)
Expected behavior
no crash
Console Output
❯ RUST_LOG=rnote=debug RUST_BACKTRACE=1 rnote
0.000130875s DEBUG rnote: .. tracing subscriber initialized.
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:949: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../mesa-25.2.2/src/intel/vulkan/anv_formats.c:981: FINISHME: support more multi-planar formats with DRM modifiers
(rnote:197206): GLib-GObject-CRITICAL **: 23:11:28.547: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(rnote:197206): Gdk-CRITICAL **: 23:11:28.547: gdk_surface_get_device_position: assertion 'GDK_IS_SURFACE (surface)' failed
(rnote:197206): Gdk-CRITICAL **: 23:11:28.547: gdk_surface_get_display: assertion 'GDK_IS_SURFACE (surface)' failed
zsh: segmentation fault (core dumped) RUST_LOG=rnote=debug RUST_BACKTRACE=1 rnote
Desktop (please complete the following information):
- OS: Linux (Arch)
- App Version: v0.13.1
- Installation Source: Archlinux Extra Repo
- Desktop Environment: Gnome 48
- Display Server: Wayland
- Input Source: On-Screen-Tablet
Additional context
HP HP ENVY x360 2-in-1 Laptop 15-ew0xxx
i've tried running it in an development environment and i can replicate the issue when i run it via flatpak but not when running the "debug ui" configuration
It doesn't happen in windows
i've tried running it in an development environment and i can replicate the issue when i run it via flatpak but not when running the "debug ui" configuration
So it fails on both the Archlinux Extra Repo and flatpak but not with this https://github.com/flxzt/rnote/blob/main/BUILDING.md#with-vscode ?
Hold down the button on the stylus which switches it to eraser mode.
This means this is probably very device-specific (not all stylus have an erased button). The closest issue to this would be https://github.com/flxzt/rnote/issues/1388 ..
Could you try to get a backtrace from gdb, either installing gdb from the package manager then running the rnote package from it
gdb rnote
run
bt
With the last line to run after the segfault occurs.
Or doing this with the flatpak if you prefer (though there are more steps to do this https://docs.flatpak.org/en/latest/debugging.html).
You can also run with the env
GTK_DEBUG=interactive
to get the exact gtk version from the second opened window (in the global tab)
Desktop:
- OS: Fedora 42
- App Version: v0.13.1
- Installation Source: Terra
- Desktop Environment: Gnome 48.4
- Display Server: Wayland
- Input Source: On-Screen-Tablet
GTK Version: 4.18.6
Device: HP Spectre x360 14-eu0xxx
Backtrace:
(gdb) bt
#0 0x00007ffff7c7ee45 in g_queue_push_tail (queue=0x18, data=0x5555592c67e0) at ../glib/gqueue.c:418
#1 0x00007ffff6da981f in _gdk_event_queue_append (display=0x0, event=0x5555592c67e0) at ../gdk/gdkevents.c:553
#2 _gdk_wayland_display_deliver_event (display=0x0, event=0x5555592c67e0) at ../gdk/wayland/gdkeventsource.c:234
#3 0x00007ffff6dab67b in emulate_crossing.isra.0
(surface=<optimized out>, device=<optimized out>, type=GDK_LEAVE_NOTIFY, mode=<optimized out>, time_=<optimized out>, child_surface=<optimized out>)
at ../gdk/wayland/gdkdevice-wayland.c:825
#4 0x00007ffff6db268e in gdk_wayland_tablet_flush_frame_event (tablet=0x555556694ad0, time=0) at ../gdk/wayland/gdkseat-wayland.c:2682
#5 0x00007ffff7627056 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#6 0x00007ffff7622d08 in ffi_call_int (cif=cif@entry=0x7fffffffaca0, fn=fn@entry=0x7ffff6db8700 <tablet_tool_handle_frame>, rvalue=<optimized out>,
rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffad70, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#7 0x00007ffff762570e in ffi_call (cif=cif@entry=0x7fffffffaca0, fn=0x7ffff6db8700 <tablet_tool_handle_frame>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffad70)
at ../src/x86/ffi64.c:710
#8 0x00007ffff556dfeb in wl_closure_invoke (closure=closure@entry=0x55555751e630, target=<optimized out>,
target@entry=0x55555791e600, opcode=opcode@entry=18, data=<optimized out>, flags=1) at ../src/connection.c:1241
#9 0x00007ffff556ee49 in dispatch_event (display=display@entry=0x55555666d950, queue=queue@entry=0x55555666da48) at ../src/wayland-client.c:1707
#10 0x00007ffff556f243 in dispatch_queue (display=0x55555666d950, queue=0x55555666da48) at ../src/wayland-client.c:1853
#11 wl_display_dispatch_queue_pending (display=0x55555666d950, queue=0x55555666da48) at ../src/wayland-client.c:2190
#12 0x00007ffff556f2b0 in wl_display_dispatch_pending (display=<optimized out>) at ../src/wayland-client.c:2253
#13 0x00007ffff6da617a in _gdk_wayland_display_queue_events (display=0x555556673b60) at ../gdk/wayland/gdkeventsource.c:314
#14 0x00007ffff6da1a83 in gdk_display_get_event (display=0x555556673b60) at ../gdk/gdkdisplay.c:534
#15 gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../gdk/broadway/gdkeventsource.c:373
#16 0x00007ffff7c66863 in g_main_dispatch (context=0x5555566237e0) at ../glib/gmain.c:3398
#17 g_main_context_dispatch_unlocked (context=0x5555566237e0) at ../glib/gmain.c:4249
#18 0x00007ffff7c6f7a8 in g_main_context_iterate_unlocked (context=context@entry=0x5555566237e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../glib/gmain.c:4314
#19 0x00007ffff7c6f953 in g_main_context_iteration (context=context@entry=0x5555566237e0, may_block=may_block@entry=1) at ../glib/gmain.c:4379
#20 0x00007ffff7b078bd in g_application_run (application=0x55555661d7a0, argc=<optimized out>, argv=<optimized out>) at ../gio/gapplication.c:2715
#21 0x0000555555b756f7 in gio::application::ApplicationExtManual::run_with_args<rnote::app::RnApp, alloc::string::String> ()
at redhat-linux-build/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/gio-0.21.1/src/application.rs:25
#22 gio::application::ApplicationExtManual::run<rnote::app::RnApp> ()
at redhat-linux-build/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/gio-0.21.1/src/application.rs:17
#23 rnote::main () at crates/rnote-ui/src/main.rs:96
Should be related to xournalpp/xournalpp#6688 (which has been reported upstream)