pwmt / zathura

Document viewer

Home Page:https://pwmt.org/projects/zathura

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix segfault for fast file reloading - [opened]

sebastinas opened this issue · comments

On GitLab by @numas13 on Mar 1, 2024, 13:28


Merges fix-fast-reload -> develop

Fix #120

That's a fallout from !80 and needs some more work. The issue is that the renderer is stopped, but the pages referencing the renderer are still around.

On GitLab by @numas13 on Mar 3, 2024, 05:04


Originally I catch the bug while editing Typst file in version 0.5.2 (bccbe93 before that merge).

debug: ../zathura/zathura.c:1241: document_open(): Failed to load bookmarks.
debug: ../zathura/jumplist.c:158: zathura_jumplist_load(): Loaded the jumplist from the database
debug: ../zathura/render.c:971: page_cache_is_cached(): Page 1 is a cache miss
debug: ../zathura/render.c:1070: zathura_renderer_page_cache_add(): Page 1 is cached at cache index 0
debug: ../zathura/file-monitor-glib.c:28: file_changed(): received file-monitor event for file:///home/denis/dev/zathura/zathura/test.pdf
debug: ../zathura/content-type.c:72: guess_type_magic(): magic detected filetype: application/pdf
debug: ../zathura/zathura.c:686: setup_renderer(): starting renderer with cache size 15
debug: ../zathura/zathura.c:194: zathura_update_view_ppi(): on Wayland, correcting PPI for device scale factor = 1
debug: ../zathura/zathura.c:203: zathura_update_view_ppi(): monitor width: 480 mm, pixels: 1920, ppi: 101.60
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 0 to 954 x 1349 (595.28 x 841.89).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 1 to 954 x 1349 (595.28 x 841.89).
debug: ../zathura/render.c:923: render_all(): Queuing resize for page 2 to 954 x 1349 (595.28 x 841.89).
debug: ../zathura/callbacks.c:235: cb_widget_screen_changed(): called
debug: ../zathura/zathura.c:194: zathura_update_view_ppi(): on Wayland, correcting PPI for device scale factor = 1
debug: ../zathura/zathura.c:1241: document_open(): Failed to load bookmarks.
debug: ../zathura/jumplist.c:158: zathura_jumplist_load(): Loaded the jumplist from the database
debug: ../zathura/render.c:971: page_cache_is_cached(): Page 1 is a cache miss
debug: ../zathura/render.c:1070: zathura_renderer_page_cache_add(): Page 1 is cached at cache index 0
debug: ../zathura/render.c:896: render_job(): Rendering page 1 ...
debug: ../zathura/file-monitor-glib.c:28: file_changed(): received file-monitor event for file:///home/denis/dev/zathura/zathura/test.pdf
some font thing failed
Segmentation fault

There are more issues, indeed. We'll need to make the document instance ref-counted at least.