Occasional crash when opening a document

Product: PDFTron

Product Version: Latest

Please give a brief summary of your issue:
Every once in awhile we get this crash in the app. Error Domain=com.pdftron.tools Code=0 “Failed: Restoring saved view state for document” UserInfo={NSLocalizedFailureReason=Could not get extended attribute data, NSLocalizedDescription=Failed: Restoring saved view state for document**

It is so intermittent it is hard to tell what is going on. But it does happen often enough that it is worrisome for our users.

Please describe your issue and provide steps to reproduce it:
This happens every once in awhile. I haven’t been able to get exact repo step, but it happens more often of forms with many annotations made. Not sure exactly what PDFTron is doing behind the scenes but we found two flags. One is automaticallySavesDocument and the other is isViewStatePersistenceEnable. These default to true. If I toggle these off should it fix our problem or are these toggles something you recommend we keep on?

We don’t want PDFTron to save document because we just pull from the a URL every time and then add the form fields or annotations on once the document as loaded from our backend. Hoping that we are okay to turn these off and it’ll fix our occasional crash?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi there,
Are you seeing a hard crash of your app, or that the error is printed to the development console? The error that you’ve posted should not be a fatal error.

If you are opening remote documents then yes, you can disable those two properties for auto-saving and view-state-persistence.

I am getting a hard crash. Here is the full error. Bu t I will disable those properties. It seemed to do the trick.

Error Domain=com.pdftron.tools Code=0 “Failed: Restoring saved view state for document” UserInfo={NSLocalizedFailureReason=Could not get extended attribute data, NSLocalizedDescription=Failed: Restoring saved view state for document, NSUnderlyingError=0x6000025c63d0 {Error Domain=com.pdftron.tools Code=0 “Failed: Reading extended attribute” UserInfo={NSLocalizedFailureReason=An internal error occurred, NSLocalizedDescription=Failed: Reading extended attribute, NSUnderlyingError=0x6000025c62e0 {Error Domain=NSPOSIXErrorDomain Code=93 “Attribute not found” UserInfo={NSLocalizedDescription=POSIX error, NSLocalizedFailureReason=Attribute not found}}}}}

Thanks for letting us know, glad to hear you got it working.