sioyek icon indicating copy to clipboard operation
sioyek copied to clipboard

basic_string::_M_construct null not valid

Open mil-ad opened this issue 10 months ago • 7 comments

I have suddenly started getting this error on some files:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
zsh: IOT instruction (core dumped)  sioyek foo.pdf

Is this is a known issue? I'm running the pre-release on Linux 6.12.

mil-ad avatar Feb 20 '25 17:02 mil-ad

You mean the appimage? Can you share the pdf file?

ahrm avatar Feb 20 '25 18:02 ahrm

I was seeing a similar error with this paper. It turned out that after moving my .local/share/sioyek/shared.db I could open the PDF without problems. I moved back and forth the shared.db to test it and it just won't work with my old shared.db. What seems odd is that I do not think I had highlighted or done anything to store information about this particular PDF in the database (I think).

Maduvi avatar Mar 05 '25 17:03 Maduvi

Can confirm this is db related. I'm not sure how to make the database forget this file without nuking it.

mil-ad avatar Mar 15 '25 10:03 mil-ad

I run into a lot of issues like this because I share the db file between multiple machines (using something like seafile/dropbox). @ahrm is there an easy way to specify a database server URL instead of a local file or does that add too much complexity?

mil-ad avatar Mar 15 '25 10:03 mil-ad

I think the original issue should be pretty easy to fix. Can you share the full crash stack trace?

ahrm avatar Mar 15 '25 10:03 ahrm

I'm afraid that's the full error I'm getting:

 sioyek --verbose compute.pdf 
default_config_path: /tmp/.mount_sioyekqynwWe/usr/bin/prefs.config
default_keys_path: /tmp/.mount_sioyekqynwWe/usr/bin/keys.config
user_config_path: [ 0 ] /etc/xdg/AppRun.wrapped/prefs_user.config
user_config_path: [ 1 ] /home/milad/.config/AppRun.wrapped/prefs_user.config
user_config_path: [ 2 ] /home/milad/.local/share/Sioyek/prefs_user.config
user_config_path: [ 3 ] /home/milad/.config/sioyek/prefs_user.config
user_keys_path: [ 0 ] /etc/xdg/AppRun.wrapped/keys_user.config
user_keys_path: [ 1 ] /home/milad/.config/AppRun.wrapped/keys_user.config
user_keys_path: [ 2 ] /home/milad/.local/share/Sioyek/keys_user.config
user_keys_path: [ 3 ] /home/milad/.config/sioyek/keys_user.config
database_file_path: /home/milad/.local/share/Sioyek/test.db
local_database_file_path: /home/milad/.local/share/Sioyek/local.db
global_database_file_path: /home/milad/Sync/documents/sioyek_database.db
tutorial_path: /home/milad/.local/share/Sioyek/tutorial.pdf
last_opened_file_address_path: /home/milad/.local/share/Sioyek/last_document_path.txt
shader_path: /tmp/.mount_sioyekqynwWe/usr/bin/shaders
SIOYEK
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:288 overwritten by /home/milad/.config/sioyek/keys_user.config:1. Overriding command: q: replacing quit with close_window
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:285 overwritten by /home/milad/.config/sioyek/keys_user.config:2. Overriding command: <f5>: replacing toggle_presentation_mode with reload
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:101 overwritten by /home/milad/.config/sioyek/keys_user.config:3. Overriding command: r: replacing rotate_clockwise with reload
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:291 overwritten by /home/milad/.config/sioyek/keys_user.config:4. Overriding command: f: replacing open_link with toggle_fullscreen
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:227 overwritten by /home/milad/.config/sioyek/keys_user.config:7. Overriding command: <tab>: replacing goto_portal with goto_toc
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:281 overwritten by /home/milad/.config/sioyek/keys_user.config:9. Overriding command: <C-]>: replacing goto_definition with next_state
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:255 overwritten by /home/milad/.config/sioyek/keys_user.config:14. Overriding command: s: replacing external_search with fit_to_page_height
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:23 overwritten by /home/milad/.config/sioyek/keys_user.config:17. Overriding command: gg: replacing goto_beginning with goto_beginning;goto_top_of_page
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:31 overwritten by /home/milad/.config/sioyek/keys_user.config:18. Overriding command: <home>: replacing goto_page_with_page_number with goto_beginning;goto_top_of_page
Warning: key defined in /tmp/.mount_sioyekqynwWe/usr/bin/keys.config:76 overwritten by /home/milad/.config/sioyek/keys_user.config:19. Overriding command: <C-t>: replacing new_window with toggle_custom_color
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
zsh: IOT instruction (core dumped)  sioyek --verbose compute.pdf

mil-ad avatar Mar 17 '25 15:03 mil-ad

Do you get more info if you run it with gdb? E.g.:

gdb --args sioyek --verbose compute.pdf

ahrm avatar Mar 17 '25 16:03 ahrm