iOS: Crash when opening PDF with deleted pages

edited February 9, 2024
I used the desktop app (probably version beta 56 or 57) to delete a few pages from 2 PDFs. However, now I cannot open these PDFs in the iOS app. The app crashes upon tapping on the item in the library list. The desktop app does not have any issues opening the files.

Below are some crash reports with debug logs for the 2 files:

Crash report ID: 883722261
Debug log: D542816596

Crash report ID: 1108223354
Debug log: D1863056213

This is using the iOS app version 1.0.26 Build 230 on iPadOS 17.3.
  • edited February 17, 2024
    I uninstalled/reinstalled Zotero on one of my iOS devices and the issue is still present. I then tried to reproduce this by deleting pages from a different PDF (using desktop version 7.0.0-beta.58+2665090aa (64-bit)), and that can be opened without issue in iOS.

    Since I'm unable to recreate the problem, are there any suggestions on how to fix the two items that can no longer be opened in iOS?
  • In case anyone else finds themselves in a similar situation, I ended up doing the following:

    1. For the problematic item, export the PDF with annotations.
    2. Duplicate the item.
    3. Add the file from Step 1 as an attachment to the newly created item.
    4. Open the PDF for the new item and import the annotations.
    5. Move the problematic item to the trash.

    There's probably a simpler way, but the above steps fixed the problem for me.
  • Hey @warwickmm, do you remember, in both documents, which pages did you delete in relation to the total number of pages?
    Where there in the 2nd document, that didn't crash, any annotations after the deleted pages?
  • @warwickmm we figured out the issue and it'll be fixed in upcoming updates to both iOS and desktop apps.

    What you did works, but if this happens to you in the meanwhile, open the document which crashes on iOS in your desktop app. Then try to edit annotations that are placed on pages that come after deleted pages. So if you have document with 10 pages and you deleted page 5, update annotations on pages 6-10. You can just move them slightly, change color or do whatever change you can. You can then manually sync on desktop app (or just wait for it to sync automatically). Then sync your iOS app and iOS app should not crash anymore.
  • Thanks!

    mvasilak, for the broken items I had deleted a range of pages at the beginning and at the end of the file. Both items had annotations in the remaining pages. Unfortunately, I don't recall if there were any annotations in the example that didn't have any problems.
Sign In or Register to comment.