Documents app creates corrupted PDF files instead of saving annotations

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 3.4
HARDWARE (XA2, X10, X10 II, …): Xperia X
REGRESSION: (compared to previous public release: Yes, No, ?): I don’t think so

DESCRIPTION:

The official documents app creates broken PDF files instead of saving annotations under certain conditions.

STEPS TO REPRODUCE:

  1. Open the documents app
  2. Open a PDF file
  3. Select some text and create an annotation (e.g. highlight it)
  4. Switch to the app overview (the “desktop” with all app covers)
  5. Close the documents app from here (long press on the cover, close)
  6. Open the documents app again; notice there is a new PDF file of exactly 48 KiB that cannot be openend; it is named “.pdf.XXXX” where “XXXX” are random characters

Important: the bug only occurs when closing the app while the PDF is still being shown. In other words, it does not occur when you switch back to the files list before closing the app.

EXPECTED RESULT:

I don’t want to lose my annotations when closing the app while the PDF is still opened.

Annotations should be properly saved after every change. This might be less efficient than saving the file only once after returning to the files list - but you never want to lose important annotations because the app was closed in a completely legitimate way.

ACTUAL RESULT:

All annotations are lost. The file that is left behind contains no recoverable data. I cannot check what is actually contains because even pdftk refuses to read it.

ADDITIONAL INFORMATION:

I cannot check whether this still happens on SFOS 4.x because I currently don’t have an updated device.

Well, it’s quite simple… You can’t highlight anymore. At least, I can’t on my Xperia 10 II on 4.4.0.58. Let’s check on GitHub if they remove it.

Edit : I didn’t understand the UI. First you need to click on the pen, then you can highlight. On 4.4.0.58, bug is fixed.

2 Likes