saber icon indicating copy to clipboard operation
saber copied to clipboard

App crashes with many-paged PDF

Open rambonette opened this issue 4 months ago • 8 comments

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

  1. Open Saber
  2. In the Home section tap on '+'
  3. Tap on Import note
  4. Select the long PDF
  5. Scroll to page 100
  6. 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.

rambonette avatar Aug 30 '25 11:08 rambonette

happens to me too, but faster on my phone it takes a while but crashes too

dreamAviator avatar Oct 05 '25 13:10 dreamAviator

On the Windows version, I also experience freezes and crashes when opening PDFs with a large number of pages.

BulbLi avatar Oct 14 '25 03:10 BulbLi

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.

QubaB avatar Oct 14 '25 04:10 QubaB

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 :)

rambonette avatar Oct 14 '25 06:10 rambonette

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

dreamAviator avatar Oct 14 '25 06:10 dreamAviator

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.

QubaB avatar Oct 14 '25 08:10 QubaB

alright. yeah i didnt want to come off as rude or anything, i‘m sorry

dreamAviator avatar Oct 15 '25 08:10 dreamAviator

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.

QubaB avatar Oct 15 '25 12:10 QubaB

I kinda have a problem with exporting to pdf if the document is large

dreamAviator avatar Dec 11 '25 09:12 dreamAviator