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

Crash after selecting "Select linear PDF Text" #5414

Closed
yasmah74 opened this issue Dec 18, 2023 · 3 comments
Closed

Crash after selecting "Select linear PDF Text" #5414

yasmah74 opened this issue Dec 18, 2023 · 3 comments
Labels

Comments

@yasmah74
Copy link

Operating System

Linux

(Linux only) Distribution

Ubuntu

(Linux only) Desktop Environment

GNOME

(Linux Only) Display Server

None

Installation Method

PPA

Xournal++ Version

1.2.2+dev

libgtk Version

3.24.38

Bug Description

The Programm crashes after selecting the Tool "Select linear PDF Text" and click on anywhere on the page.

Expected Behaviour

Selecting the Text of the PDF.

Steps to Reproduce

  1. Select "Select linear PDF Text"
  2. Click on anywhere on the Page (No Diffrence between clicking on text or no)

Additional Context

Date: Mon Dec 18 12:14:29 2023
Error: signal 6
Xournal++ version 1.2.2+dev
Gtk version 3.24.38

[bt]: (0) /usr/bin/xournalpp(+0xd238a) [0x56157bcae38a]
[bt]: (1) /lib/x86_64-linux-gnu/libc.so.6(+0x42910) [0x7f8090442910]
[bt]: (2) /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11b) [0x7f809049999b]
[bt]: (3) /lib/x86_64-linux-gnu/libc.so.6(raise+0x16) [0x7f8090442866]
[bt]: (4) /lib/x86_64-linux-gnu/libc.so.6(abort+0xd7) [0x7f80904268b7]
[bt]: (5) /usr/bin/xournalpp(ZN3xoj4util13assertFailureEPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_iS2+0x12e) [0x56157bdfadce]
[bt]: (6) /usr/bin/xournalpp(_ZNK11XojPageView11repaintAreaEdddd+0x2d3) [0x56157bd74333]
[bt]: (7) /usr/bin/xournalpp(_ZN16PdfElemSelection10currentPosEdd24XojPdfPageSelectionStyle+0x162) [0x56157bd609b2]
[bt]: (8) /usr/bin/xournalpp(_ZN11XojPageView19onMotionNotifyEventERK17PositionInputData+0x1df) [0x56157bd728ff]
[bt]: (9) /usr/bin/xournalpp(_ZN15PenInputHandler12actionMotionERK10InputEvent+0x3e1) [0x56157bce6771]
[bt]: (10) /usr/bin/xournalpp(_ZN17MouseInputHandler10handleImplERK10InputEvent+0xfb) [0x56157bce6c7b]
[bt]: (11) /usr/bin/xournalpp(_ZN12InputContext6handleEP9_GdkEvent+0x2ac) [0x56157bce51bc]
[bt]: (12) /usr/bin/xournalpp(_ZN3xoj4util6detail9wrap_implIXadL_ZN12InputContext13eventCallbackEP10_GtkWidgetP9_GdkEventPS3_EEbS8_JS5_S7_EEENSt11conditionalIX9is_same_vIbT0_EEiSA_E4typeEDpT2_Pv+0x10) [0x56157bce5300]
[bt]: (13) /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x980d8) [0x7f80914980d8]
[bt]: (14) /lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x33add) [0x7f8091038add]
[bt]: (15) /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x36) [0x7f8091038bd6]
[bt]: (16) /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x93) [0x7f8091038c93]
[bt]: (17) /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x34efba) [0x7f809174efba]
[bt]: (18) /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x1f7b1e) [0x7f80915f7b1e]
[bt]: (19) /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_do_event+0x986) [0x7f80915f85f6]
[bt]: (20) /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x398b7) [0x7f809133d8b7]
[bt]: (21) /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x708c6) [0x7f80913748c6]
[bt]: (22) /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ab2c) [0x7f8090f18b2c]
[bt]: (23) /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xb646f) [0x7f8090f7446f]
[bt]: (24) /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x30) [0x7f8090f16d20]
[bt]: (25) /lib/x86_64-linux-gnu/libgio-2.0.so.0(g_application_run+0x16d) [0x7f8091176b5d]
[bt]: (26) /usr/bin/xournalpp(_ZN11XournalMain3runEiPPc+0x6e3) [0x56157bcaa1b3]
[bt]: (27) /lib/x86_64-linux-gnu/libc.so.6(+0x280d0) [0x7f80904280d0]
[bt]: (28) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7f8090428189]
[bt]: (29) /usr/bin/xournalpp(_start+0x25) [0x56157bca7365]

Try to get a better stracktrace...
[bt] #1 /usr/bin/xournalpp(+0xd2897) [0x56157bcae897]
??:0
[bt] #2 /lib/x86_64-linux-gnu/libc.so.6(+0x42910) [0x7f8090442910]
??:0
[bt] #3 /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11b) [0x7f809049999b]
??:0
[bt] #4 /lib/x86_64-linux-gnu/libc.so.6(raise+0x16) [0x7f8090442866]
??:0
[bt] #5 /lib/x86_64-linux-gnu/libc.so.6(abort+0xd7) [0x7f80904268b7]
??:0
[bt] #6 /usr/bin/xournalpp(ZN3xoj4util13assertFailureEPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_iS2+0x12e) [0x56157bdfadce]
??:0
[bt] #7 /usr/bin/xournalpp(_ZNK11XojPageView11repaintAreaEdddd+0x2d3) [0x56157bd74333]
??:0
[bt] #8 /usr/bin/xournalpp(_ZN16PdfElemSelection10currentPosEdd24XojPdfPageSelectionStyle+0x162) [0x56157bd609b2]
??:0
[bt] #9 /usr/bin/xournalpp(_ZN11XojPageView19onMotionNotifyEventERK17PositionInputData+0x1df) [0x56157bd728ff]
??:0
[bt] #10 /usr/bin/xournalpp(_ZN15PenInputHandler12actionMotionERK10InputEvent+0x3e1) [0x56157bce6771]
??:0
[bt] #11 /usr/bin/xournalpp(_ZN17MouseInputHandler10handleImplERK10InputEvent+0xfb) [0x56157bce6c7b]
??:0
[bt] #12 /usr/bin/xournalpp(_ZN12InputContext6handleEP9_GdkEvent+0x2ac) [0x56157bce51bc]
??:0
[bt] #13 /usr/bin/xournalpp(_ZN3xoj4util6detail9wrap_implIXadL_ZN12InputContext13eventCallbackEP10_GtkWidgetP9_GdkEventPS3_EEbS8_JS5_S7_EEENSt11conditionalIX9is_same_vIbT0_EEiSA_E4typeEDpT2_Pv+0x10) [0x56157bce5300]
??:0
[bt] #14 /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x980d8) [0x7f80914980d8]
??:0
[bt] #15 /lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x33add) [0x7f8091038add]
??:0
[bt] #16 /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit_valist+0x36) [0x7f8091038bd6]
??:0
[bt] #17 /lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_signal_emit+0x93) [0x7f8091038c93]
??:0
[bt] #18 /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x34efba) [0x7f809174efba]
??:0
[bt] #19 /lib/x86_64-linux-gnu/libgtk-3.so.0(+0x1f7b1e) [0x7f80915f7b1e]
??:0
[bt] #20 /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_do_event+0x986) [0x7f80915f85f6]
??:0
[bt] #21 /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x398b7) [0x7f809133d8b7]
??:0
[bt] #22 /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x708c6) [0x7f80913748c6]
??:0
[bt] #23 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5ab2c) [0x7f8090f18b2c]
??:0
[bt] #24 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xb646f) [0x7f8090f7446f]
??:0
[bt] #25 /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x30) [0x7f8090f16d20]
??:0
[bt] #26 /lib/x86_64-linux-gnu/libgio-2.0.so.0(g_application_run+0x16d) [0x7f8091176b5d]
??:0
[bt] #27 /usr/bin/xournalpp(_ZN11XournalMain3runEiPPc+0x6e3) [0x56157bcaa1b3]
??:0
[bt] #28 /lib/x86_64-linux-gnu/libc.so.6(+0x280d0) [0x7f80904280d0]
??:0
[bt] #29 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7f8090428189]
??:0
[bt] #30 /usr/bin/xournalpp(_start+0x25) [0x56157bca7365]
??: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 dconf (DConfSettingsBackend) for ‘gsettings-backend’
DEBUG : GLib-GIO :: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
DEBUG : GLib :: unsetenv() is not thread-safe and should not be used after threads are created
MESSAGE : xopp :: TEXTDOMAINDIR = (null), Platform-specific locale dir = /usr/share/xournalpp/../locale, chosen directory = /usr/share/xournalpp/../locale
INFO : xopp :: Loading plugins from: /usr/share/xournalpp/plugins
INFO : xopp :: Loading plugins from: /home/yasin/.config/xournalpp/plugins
MESSAGE : xopp :: Plugin "MigrateFontSizes" UI initialized
CRITICAL: Gtk :: gtk_tree_model_iter_children: assertion 'GTK_IS_TREE_MODEL (tree_model)' failed
CRITICAL: GLib-GObject :: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
CRITICAL: xopp :: Assertion failed: rv0 == static_cast(rv1)
in function ceil_cast
at line 91 of ./src/util/include/util/safe_casts.h
WARNING : xopp :: [Crash Handler] Crashed with signal 6
WARNING : xopp :: [Crash Handler] Wrote crash log to: /home/yasin/.cache/xournalpp/errorlogs/errorlog.20231218-121429.log

@yasmah74 yasmah74 added the bug label Dec 18, 2023
@tmoerschell
Copy link
Contributor

Found the issue! Will post a simple patch in a second.
Area text selection should still work, right?

To avoid the assertion error for now, you could also compile Xournal++ yourself with the -DCMAKE_BUILD_TYPE=RelWithDebInfo option.

@tmoerschell
Copy link
Contributor

Oh I just found this was already solved by #5348. It will be in the next minor release. The nightly build already contains the fix.

@bhennion
Copy link
Contributor

Thanks for the report and the investigation! Closing as solved.

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

No branches or pull requests

3 participants