When integrating PDFViewer into my app for the first time, I tried opening a PDF file that I had copied into a Documents folder on my Android device. The app kept crashing, and the LogCat only gave the following error, with no stack trace:
A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
I tracked the problem down to the open method in util.PDFFileStream, which opens all files with "rw" permissions. I changed the permissions to "r" and everything worked well. The I added a wrapper class that allows me to pass in the desired permissions, without affecting any calls to this method that other parts of the library might be making.
This seems like a big roadblock that new developers would run into. Shouldn't the library handle read-only as well as read-write files, or at least show a warning message if it encounters incorrect file permissions?
I'm new to PDFViewer and new to Android, so maybe there's something I don't understand about how this is set up.