pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
2.1k stars 146 forks source link

Large document is not drawn correctly #65

Open sebastinas opened 6 years ago

sebastinas commented 6 years ago

On GitLab by @anatol on Jun 13, 2018, 23:33


I am trying to open a large PDF with zathura but all I see is black screen. I try to scroll up and down - status bar shows pages are changed, but it does not improve the screen issue.

I tried it at Arch and Ubuntu linux.

To reproduce the issue please download this Intel manual and try to open https://software.intel.com/en-us/download/intel-64-and-ia-32-architectures-sdm-combined-volumes-1-2a-2b-2c-2d-3a-3b-3c-3d-and-4

sebastinas commented 5 years ago

Which PDF plugin are you using? The file gets rendered quite slowly on my end (with the poppler plugin), but the pages are displayed.

sebastinas commented 5 years ago

On GitLab by @anatol on Nov 28, 2018, 24:47


I have up-to-date Arch Linux with following zathura packages installed:

$ pacman -Qe | grep zathura zathura 0.4.1-1 zathura-pdf-mupdf 0.3.4-1

I still the the issue with the document above. I can repro it by opening the document, make the window full-screen and then pressing 's'. I see a black screen no matter what page I go. I have a 1920*1080 monitor if it matters.

I installed poppler plugin and the issue still exists.

$ pacman -Qe | grep zathura zathura 0.4.1-1 zathura-pdf-poppler 0.2.9-1

sebastinas commented 5 years ago

On GitLab by @maximinh on Feb 25, 2019, 13:17


Having the same problem here as well. I found out that if I zoom out the page will render again. If I zoom enough in it will aslo render. Looks like render_job() hangs in some sizes.

Arch linux on kernel 4.20 Zathura 0.4.3-1 with zathura pdf-mupdf 0.3.4-1. Same error with poppler . Only happening on large files with 1000++ pages

It stops like this in debug mode

debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4006 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4007 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4008 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4009 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4010 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4011 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4012 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4013 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4014 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4015 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4016 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4017 to 1716 x 2221 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4018 to 1716 x 2221 (612.00 x 792.00).

When zooming out (paged get rendered) the output look like this:

debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4006 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4007 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4008 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4009 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4010 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4011 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4012 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4013 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4014 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4015 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4016 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4017 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:870: render_all(): Queuing resize for page 4018 to 1560 x 2019 (612.00 x 792.00).
debug: ../zathura/render.c:844: render_job(): Rendering page 20 ...
debug: ../zathura/render.c:844: render_job(): Rendering page 19 ...
debug: ../zathura/render.c:520: emit_completed_signal(): Emitting signal for page 20
debug: ../zathura/render.c:520: emit_completed_signal(): Emitting signal for page 19
sebastinas commented 4 years ago

On GitLab by @svenschwermer on Jun 25, 2020, 22:41


I would like to investigate this. I have noticed that zathura_page_widget_draw doesn't get called for pages that don't get drawn, i.e. the described error behavior. If I understood the code correctly, this function is responsible for queuing the rendering job which never happens. The mentioned function seems to be the draw method of the GTK widget. However, since I'm not familiar with GTK, I was wondering what usually makes GTK call that method? If anybody more familiar with the framework could give me a few hints, I could track this down further.

sebastinas commented 1 year ago

On GitLab by @andipersti on Apr 29, 2023, 18:13


See also #321.

vinc17fr commented 2 months ago

On GitLab by @AndiPersti on Apr 29, 2023, 18:13 See also #321.

The references to the issues have changed with the migration. I suppose that this is now #365.

vinc17fr commented 2 months ago

I've reported Debian bug 1079283, which occurs on the same PDF file (well, almost, as it has been updated since then)! Note that for me, only the first dozens/hundreds of pages appear as black; in particular, I could notice this by typing the [End] key. Once the issue occurred, it occurred every time: it seems that the .local/share/zathura/bookmarks.sqlite file got somewhat corrupt. When I tried again with a clean .local/share/zathura directory, I couldn't reproduce the issue. Perhaps a race condition?