Bug 694849

Summary: Crash when PDF file needs password
Product: MuPDF Reporter: sohyun.ahn.sh
Component: appsAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: paul.gardiner, robin.watts
Priority: P4    
Version: master   
Hardware: Android Phone   
OS: Android   
Customer: Word Size: ---
Attachments: Error log

Description sohyun.ahn.sh 2013-12-16 23:13:47 UTC
Created attachment 10467 [details]
Error log

I just use build the existed android project in github source. (not in google play)
When I load the pdf file that needs password, then it is crashed.
I think it is because 'mDocView' is used in MuPDFActivity.showButtons() before constructed. That is, onPrepareOptionsMenu() is called before createUI().

Simply, I make boolean object for checking it needs password. And if this boolean object is true, codes in onPrepareOptionsMenu() is not used. Then, in the password dialog, when the Possitive button is clicked, I call showButtons() and searchModeOff().

I think there are better answers. 
I attach the error log text file.
please fix it. Thank you.
Comment 1 Robin Watts 2013-12-17 02:20:24 UTC
We don't have our source on github. Are you using someone elses out of date mirror? Please retry with the source from git.ghostscript.com/mupdf.git and tell us if the problem still occurs.
Comment 2 sohyun.ahn.sh 2013-12-17 17:21:36 UTC
Oh, I mistaked git repository for github's. I tried using source in git.ghostscript.com/mupdf.git.
Comment 3 Robin Watts 2013-12-18 03:11:26 UTC
Can you attach an example file please? I can't promise when I'll look at this, but having an example file to hand makes it more likely.
Comment 4 sohyun.ahn.sh 2013-12-18 18:10:36 UTC
I removed the previous code, and re-download mupdf code. Then it works. I don't know why it happened. I'm sorry bothering you.
Comment 5 Robin Watts 2013-12-19 02:33:23 UTC
No problem. We may have fixed it recently then.