Opening .doc file is crashing our app

Product: native android sdk

Product Version: 9.3.1

Please give a brief summary of your issue:
Opening a .doc file that is 1MB is crashing our app

Please describe your issue and provide steps to reproduce it:
We are opening the file provided in the repo below in our PdfViewCtrlTabHostFragment2. We are creating the fragment with ViewerBuilder2.withUri(Uri.parse(link)).

For some reason only this file is crashing our app with error:

A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6272 (Thread-57), pid 5009

As far as I know from previous seeing this kind of fatal error and more research online, it means the UI thread is being blocked.

I’m very confused as to why it is only happening with this file or random larger file sizes.

Please provide a link to a minimal sample where the issue is reproducible:

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 @seth.pacheco

I tried to replicate your issue with opening this .doc file, however was able to open it with no issues as shown here:

Would you be able to provide a sample project that replicates this issue?

Hi Seth,

This is crashing due to the following code in onDocumentLoaded in newFileViewerFragment:

pdfViewCtrlTabHostFragment?.currentPdfViewCtrlFragment?.pdfDoc?.undoManager?.takeSnapshot()

the undoManager is for library internal use only, you will only need to take snapshot when you have modified the document programmatically in your own code, otherwise, it should not be used.

Could you let us know why this line of code is required and what you are trying to achieve?

Best Regards,
Eamon

1 Like

Removing that fixed the crash. We were using it to try to disallow the undo button from removing annotations added from our backend. We load the annotations, then the undo button would remove those annotations. We have since removed the undo/redo function, so removing this line works for us.

1 Like