App crashes with many-paged PDF
Before submitting an issue, please check the following
- [x] I have searched for similar issues (both open and closed) and cannot find a duplicate
- [x] I agree to follow the Code of Conduct
Describe the bug
I wanna actually start by saying that I'm aware of previous issues #771 , #1209 and #1385 but none of them got solved nor got much traction. I tried many of the user suggestions that were proposed there with no luck.
The app crashes consistently when loading an image-rich 500+ pages PDF.
I'd gladly provide some logs, but my Logs section is always empty no matter if I play/pause the section button.
To reproduce
- Open Saber
- In the Home section tap on '+'
- Tap on Import note
- Select the long PDF
- Scroll to page 100
- wait for it to crash
I recorded a small video which shows the steps that consistently bring Saber to crash. Sorry for the potato-quality video, but github wouldn't let me upload the original 13MB~.
https://github.com/user-attachments/assets/5adedd14-9337-4d23-b336-9279eee11f18
Expected behavior
I'd expect Saber to:
- not crash
- implement a loading strategy which prioritizes scroll position
Saber version
v0.26.3 F-Droid (26030)
Device
- Device: Lenovo Idea Tab Pro 8GB RAM
- OS: Android 15
Anything else?
Let me know if I can provide anything else. I've got some programming skills so I don't mind diving into some technical stuff.
happens to me too, but faster on my phone it takes a while but crashes too
On the Windows version, I also experience freezes and crashes when opening PDFs with a large number of pages.
I am working on the fix, however it will need rework of internal cache of Saber. I published a draft of how to do it #1546 but it will take a time to finish and thoroughly test.
I am working on the fix, however it will need rework of internal cache of Saber. I published a draft of how to do it #1546 but it will take a time to finish and thoroughly test.
thanks @QubaB ! Let me know if you need any help with testing :)
I tried testing it. I created a new note from a 230page pdf, saved it and closed it and reopened. While the note opens, the problem i have is that I need to scroll to the bottom. So i'm using the page overview. And when I scroll down in that, it crashes
(I just noticed, I hadn't updated my app. Gonna post an update now)
Alright. Even with the update the problem persists.
Still thank you for your work
I was testing it only on android and it was intended to show that big pdf can be loaded and displayed relatively quickly. Now I have better version which handles also saving and opening notes, but it does not work on windows. I am investigating it now. Then I update my pull request for further testing.
alright. yeah i didnt want to come off as rude or anything, i‘m sorry
I created new pull request with cache reworked and I hope it works on Windows and Android #1559. If someone try it I will be glad for comments. I am able to open 800 pages pdfs.
I kinda have a problem with exporting to pdf if the document is large