Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error signal 11 #5400

Open
Anthony01998 opened this issue Dec 12, 2023 · 4 comments · May be fixed by #5433
Open

Error signal 11 #5400

Anthony01998 opened this issue Dec 12, 2023 · 4 comments · May be fixed by #5433
Labels

Comments

@Anthony01998
Copy link

Operating System

Linux

(Linux only) Distribution

Ubuntu 23.10

(Linux only) Desktop Environment

GNOME

(Linux Only) Display Server

Wayland

Installation Method

Official Releas

Xournal++ Version

1.2.1

libgtk Version

3.24.38

Bug Description

Date: Wed Dec 6 18:06:27 2023
Error: signal 11
Xournal++ version 1.2.1
Git commit b48932a from xournalpp/HEAD
Gtk version 3.24.38

[bt]: (0) /snap/xournalpp/86/usr/bin/xournalpp(+0x3e3555) [0x560ad9782555]
[bt]: (1) /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fd949769520]
[bt]: (2) /snap/xournalpp/86/usr/bin/xournalpp(_ZN20AbstractInputHandler33getInputDataRelativeToCurrentPageEP11XojPageViewRK10InputEvent+0x9c) [0x560ad9956b30]
[bt]: (3) /snap/xournalpp/86/usr/bin/xournalpp(_ZN15PenInputHandler12actionMotionERK10InputEvent+0x58b) [0x560ad980e3f1]
[bt]: (4) /snap/xournalpp/86/usr/bin/xournalpp(_ZN18StylusInputHandler10handleImplERK10InputEvent+0x251) [0x560ad9810681]
[bt]: (5) /snap/xournalpp/86/usr/bin/xournalpp(_ZN20AbstractInputHandler6handleERK10InputEvent+0x71) [0x560ad99569fb]
[bt]: (6) /snap/xournalpp/86/usr/bin/xournalpp(_ZN12InputContext6handleEP9_GdkEvent+0x3b9) [0x560ad9809e21]
[bt]: (7) /snap/xournalpp/86/usr/bin/xournalpp(ZN12InputContext13eventCallbackEP10_GtkWidgetP9_GdkEventPS+0x2b) [0x560ad9809a65]
[bt]: (8) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x9b548) [0x7fd94a4a8548]
[bt]: (9) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x16569) [0x7fd949fc2569]
[bt]: (10) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x2e1ab) [0x7fd949fda1ab]
[bt]: (11) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x39) [0x7fd949fe43f9]
[bt]: (12) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x93) [0x7fd949fe44c3]
[bt]: (13) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x399d67) [0x7fd94a7a6d67]
[bt]: (14) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x22a800) [0x7fd94a637800]
[bt]: (15) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_do_event+0x7f5) [0x7fd94a6397b5]
[bt]: (16) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x40e19) [0x7fd94a331e19]
[bt]: (17) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x7dce6) [0x7fd94a36ece6]
[bt]: (18) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ee2b) [0x7fd949eaee2b]
[bt]: (19) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x625f0) [0x7fd949eb25f0]
[bt]: (20) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7fd949eb2eb3]
[bt]: (21) /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0(g_application_run+0x1a5) [0x7fd94a13e025]
[bt]: (22) /snap/xournalpp/86/usr/bin/xournalpp(_ZN11XournalMain3runEiPPc+0x7f0) [0x560ad978a6e1]
[bt]: (23) /snap/xournalpp/86/usr/bin/xournalpp(main+0x29) [0x560ad9782112]
[bt]: (24) /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fd949750d90]
[bt]: (25) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fd949750e40]
[bt]: (26) /snap/xournalpp/86/usr/bin/xournalpp(_start+0x25) [0x560ad9782025]

Try to get a better stracktrace...
[bt] #1 /snap/xournalpp/86/usr/bin/xournalpp(+0x3e3cbf) [0x560ad9782cbf]
??:0
[bt] #2 /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fd949769520]
??:0
[bt] #3 /snap/xournalpp/86/usr/bin/xournalpp(_ZN20AbstractInputHandler33getInputDataRelativeToCurrentPageEP11XojPageViewRK10InputEvent+0x9c) [0x560ad9956b30]
??:0
[bt] #4 /snap/xournalpp/86/usr/bin/xournalpp(_ZN15PenInputHandler12actionMotionERK10InputEvent+0x58b) [0x560ad980e3f1]
??:0
[bt] #5 /snap/xournalpp/86/usr/bin/xournalpp(_ZN18StylusInputHandler10handleImplERK10InputEvent+0x251) [0x560ad9810681]
??:0
[bt] #6 /snap/xournalpp/86/usr/bin/xournalpp(_ZN20AbstractInputHandler6handleERK10InputEvent+0x71) [0x560ad99569fb]
??:0
[bt] #7 /snap/xournalpp/86/usr/bin/xournalpp(_ZN12InputContext6handleEP9_GdkEvent+0x3b9) [0x560ad9809e21]
??:0
[bt] #8 /snap/xournalpp/86/usr/bin/xournalpp(ZN12InputContext13eventCallbackEP10_GtkWidgetP9_GdkEventPS+0x2b) [0x560ad9809a65]
??:0
[bt] #9 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x9b548) [0x7fd94a4a8548]
??:0
[bt] #10 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x16569) [0x7fd949fc2569]
??:0
[bt] #11 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x2e1ab) [0x7fd949fda1ab]
??:0
[bt] #12 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x39) [0x7fd949fe43f9]
??:0
[bt] #13 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x93) [0x7fd949fe44c3]
??:0
[bt] #14 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x399d67) [0x7fd94a7a6d67]
??:0
[bt] #15 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(+0x22a800) [0x7fd94a637800]
??:0
[bt] #16 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_do_event+0x7f5) [0x7fd94a6397b5]
??:0
[bt] #17 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x40e19) [0x7fd94a331e19]
??:0
[bt] #18 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x7dce6) [0x7fd94a36ece6]
??:0
[bt] #19 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ee2b) [0x7fd949eaee2b]
??:0
[bt] #20 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x625f0) [0x7fd949eb25f0]
??:0
[bt] #21 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7fd949eb2eb3]
??:0
[bt] #22 /snap/xournalpp/86/gnome-platform/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0(g_application_run+0x1a5) [0x7fd94a13e025]
??:0
[bt] #23 /snap/xournalpp/86/usr/bin/xournalpp(_ZN11XournalMain3runEiPPc+0x7f0) [0x560ad978a6e1]
??:0
[bt] #24 /snap/xournalpp/86/usr/bin/xournalpp(main+0x29) [0x560ad9782112]
??:0
[bt] #25 /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fd949750d90]
??:0
[bt] #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fd949750e40]
??:0
[bt] #27 /snap/xournalpp/86/usr/bin/xournalpp(_start+0x25) [0x560ad9782025]
??:0

Execution log:

DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
DEBUG : GLib-GIO :: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
DEBUG : GLib :: unsetenv() is not thread-safe and should not be used after threads are created
MESSAGE : xopp :: TEXTDOMAINDIR = /snap/xournalpp/86/usr/share/locale, Platform-specific locale dir = /usr/share/xournalpp/../locale, chosen directory = /snap/xournalpp/86/usr/share/locale
INFO : xopp :: Loading plugins from: /snap/xournalpp/86/usr/share/xournalpp/plugins
INFO : xopp :: Loading plugins from: /home/anthony/snap/xournalpp/86/.config/xournalpp/plugins
MESSAGE : xopp :: Plugin "MigrateFontSizes" UI initialized
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
DEBUG : GLib-GIO :: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
MESSAGE : xopp :: file:
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : -- :: atk-bridge: get_device_events_reply: unknown signature
MESSAGE : xopp :: file:
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Info: autosave document...
MESSAGE : xopp :: Salvataggio automatico rinominato da /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp a /home/anthony/snap/xournalpp/common/.cache/xournalpp/autosaves/4792.old.autosave.xopp
MESSAGE : xopp :: Salvataggio automatico in /home/anthony/Documenti/Linux+/Linux+ Cert/Chapter 4 - Searcing and analyzing Text/.Searching_N_analyzing_Text.autosave.xopp
MESSAGE : xopp :: Discard impossible event - this is a sign of bugged hardware or drivers
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : GLib-GIO :: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
DEBUG : GLib-GIO :: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
WARNING : xopp :: [Crash Handler] Crashed with signal 11
WARNING : xopp :: [Crash Handler] Wrote crash log to: /home/anthony/snap/xournalpp/common/.cache/xournalpp/errorlogs/errorlog.20231206-180627.log

Expected Behaviour

Don't know

Steps to Reproduce

Don't know: just open the app and pop up the bug description

Additional Context

No response

@tmoerschell
Copy link
Contributor

Hi, thanks for reporting!

I am able to reproduce this when deleting a page I started a selection on while the selection is still ongoing (start selection with stylus, then delete the page with the mouse). It works best on the Wayland backend for some reason.

Error happens on dereference of page in AbstractInputHandler::getInputDataRelativeToCurrentPage(). addr2line tells me that the call stack frame 3 was at line 321 here:

if (this->sequenceStartPage && toolHandler->isSinglePageTool()) {
// Relay the event to the page
PositionInputData pos = getInputDataRelativeToCurrentPage(sequenceStartPage, event);
// Enforce input to stay within page
pos.x = std::clamp(pos.x, 0.0, static_cast<double>(sequenceStartPage->getDisplayWidth()));
pos.y = std::clamp(pos.y, 0.0, static_cast<double>(sequenceStartPage->getDisplayHeight()));

...which excludes page being nullptr. sequenceStartPage is set at the beginning of the selection and becomes invalid when the underlying page is deleted.

Will look at how we can fix it now

@tmoerschell
Copy link
Contributor

I'm thinking this should be fixed by changing viewPages in XournalView, which is currently a std::unique_ptr that is obviosuly shared around quite a bit, to a std::shared_ptr, and return only std::weak_ptr through the member functions. This might cause a lot of changes but I believe it might fix other issues like this one before they ever come up.
Is there someone with more modern C++ experience than me who could tell me if I'm going into the wrong direction?

@bhennion
Copy link
Contributor

I'm thinking this should be fixed by changing viewPages in XournalView, which is currently a std::unique_ptr that is obviosuly shared around quite a bit, to a std::shared_ptr, and return only std::weak_ptr through the member functions. This might cause a lot of changes but I believe it might fix other issues like this one before they ever come up. Is there someone with more modern C++ experience than me who could tell me if I'm going into the wrong direction?

That'd be an ok fix, but the real problem is how the selection business is done, I think. The EditSelection instance is owned by XournalView, but somehow refers to a specific PageView. The whole structure feels off to me.

@tmoerschell
Copy link
Contributor

tmoerschell commented Dec 22, 2023

There might be other issues to it. I agree that the selections could probably be more page agnostic, but it's not just about selections. A crash will happen with any geometric shape or PDF text selection as well. The issue here happens during the event notification process.
Will try to implement the necessary changes to shared_ptr, weak_ptr and so on.

How deep should I go with the changes? Is it ok to use shared_ptr::get() in order to pass a raw pointer to called functions once the pointer has been locked in some caller function? Else there will be a lot of const std::shared_ptr<XojPageView>& arguments that might feel a little alien in the midst of other raw pointers.

Then again, that would feel like I'd be doing only half of the work, not really making it 100% safe and change-proof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants