nuttyartist / notes

Fast and beautiful note-taking app written in C++. Write down your thoughts.
https://www.get-notes.com
Mozilla Public License 2.0
3.6k stars 316 forks source link

[Wayland] Notes segfaults when closing the application #585

Closed zjeffer closed 1 year ago

zjeffer commented 1 year ago

Tested on Hyprland.

Backtrace:

(gdb) bt
#0  0x00007ffff7fa4415 in wl_map_insert_at (map=map@entry=0x555555f63000, flags=flags@entry=1, i=6, data=<optimized out>) at ../wayland-1.22.0/src/wayland-util.c:276
#1  0x00007ffff7fa4573 in proxy_destroy (proxy=proxy@entry=0x555556038700) at ../wayland-1.22.0/src/wayland-client.c:538
#2  0x00007ffff7fa6132 in wl_proxy_destroy_caller_locks (proxy=0x555556038700) at ../wayland-1.22.0/src/wayland-client.c:562
#3  wl_proxy_marshal_array_flags (proxy=proxy@entry=0x555556038700, opcode=opcode@entry=0, interface=interface@entry=0x0, version=version@entry=4, flags=flags@entry=1, args=args@entry=0x7fffffffcd20) at ../wayland-1.22.0/src/wayland-client.c:900
#4  0x00007ffff7fa6bda in wl_proxy_marshal_flags (proxy=proxy@entry=0x555556038700, opcode=opcode@entry=0, interface=interface@entry=0x0, version=4, flags=flags@entry=1) at ../wayland-1.22.0/src/wayland-client.c:823
#5  0x00007ffff1b0352f in wp_presentation_destroy (wp_presentation=0x555556038700) at src/libnvidia-egl-wayland.so.1.1.12.p/presentation-time-client-protocol.h:268
#6  wlEglDestroyFeedback (feedback=0xe0) at ../egl-wayland/src/wayland-egldisplay.c:155
#7  terminateDisplay (display=display@entry=0x55555601d610, globalTeardown=globalTeardown@entry=1) at ../egl-wayland/src/wayland-egldisplay.c:650
#8  0x00007ffff1b0610f in wlEglDestroyAllDisplays (data=0x555555f725b0) at ../egl-wayland/src/wayland-egldisplay.c:1312
#9  wlEglUnloadPlatformExport (data=0x555555f725b0) at ../egl-wayland/src/wayland-external-exports.c:88
#10 0x00007fffedcac8f0 in ?? () from /usr/lib/libEGL_nvidia.so.0
#11 0x00007fffedca2740 in ?? () from /usr/lib/libEGL_nvidia.so.0
#12 0x00007ffff5052066 in __run_exit_handlers (status=0, listp=0x7ffff51f1760 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:111
#13 0x00007ffff50521b0 in __GI_exit (status=<optimized out>) at exit.c:141
#14 0x00007ffff5039857 in __libc_start_call_main (main=main@entry=0x555555640530 <main(int, char**)>, argc=argc@entry=1, argv=argv@entry=0x7fffffffd178) at ../sysdeps/nptl/libc_start_call_main.h:74
#15 0x00007ffff503990a in __libc_start_main_impl (main=0x555555640530 <main(int, char**)>, argc=1, argv=0x7fffffffd178, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd168) at ../csu/libc-start.c:360
#16 0x000055555559e735 in _start ()

This also causes the settings not being saved, because we only save them when we close the application and this segfault seems to happen before that.

nuttyartist commented 1 year ago

Are we sure it's because of Notes and not an upstream issue?

BTW, Hyprland looks sexy.

zjeffer commented 1 year ago

Now that you mention it, it's probably an upstream issue from qt6, I notice the same behaviour with jellyfin-media-player's qt6 branch.