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

Zooming in on long pdfs causes memory leak #449

Open
sebastinas opened this issue Feb 27, 2024 · 0 comments
Open

Zooming in on long pdfs causes memory leak #449

sebastinas opened this issue Feb 27, 2024 · 0 comments
Labels
bug Something isn't working has attachment Attachment was not transfered from GitLab

Comments

@sebastinas
Copy link
Member

On GitLab by @sungodmoth on Feb 27, 2024, 16:04


(Note: This is similar to the issue reported in the (very old) issue #209. However, the reporter of that issue did not seem to encounter the boundless increase in memory usage that I have seen, and did not identify the problem as being restricted to long pdfs.)

Environment: Running i3wm on Manjaro Linux. zathura version 0.5.4, pdf-mupdf version 0.4.1.

Description: With most pdfs I am able to zoom as far as zathura allows me to, with no issue. But on long pdfs, seemingly those with >1000 or so pages, zooming far enough in causes a black screen, and zooming even further than that causes the image to return (but blurry) and zathura's memory usage, as reported by system utilities, rapidly rises (I'm talking about a rate of over a gigabyte per second) with no sign of stopping, until either zathura is closed or the document is again zoomed out, at which point it returns to normal.

Note that this is completely uncorrelated to the file size of the file, and seems to be solely caused by the page count. Zooming in on a pdf around 150MB in size but only 500 pages in length, the problem is absent. I have attached for reference a tiny 2000 page file (created by repeated self-concatenation of a minimal pdf) which is only 262KB in size, which displays the problem clearly.

long.pdf

(Note that this file throws some warnings, but they are irrelevant to this issue, which I experience with all pdfs of this length). The maximum amount that I can zoom before the black screen appears seems to decrease with the length of the pdf. If testing this is necessary, I've also attached a pdf of twice the length (but still tiny file size).

longer.pdf

@sebastinas sebastinas added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has attachment Attachment was not transfered from GitLab
Projects
None yet
Development

No branches or pull requests

1 participant