Created attachment 10606 [details] PDF that takes more time in rendering and then crashes Good Morning, I have a specific PDF to be rendered and MuPDF is able to render it properly, but it takes long time though in rendering this PDF. The real problem comes, when I give few flips and press the back button while it renders, the App crashes. I attached the PDF with this note. Please look into this and help us. Thanks!
java.lang.NullPointerException at com.artifex.mupdfdemo.PageView.addHq in PageView.java on Line 606 at com.artifex.mupdfdemo.MuPDFReaderView.onSettle in MuPDFReaderView.java on Line 243 at com.artifex.mupdfdemo.ReaderView$2.run in ReaderView.java on Line 781 at android.os.Handler.handleCallback in Handler.java on Line 725 at android.os.Handler.dispatchMessage in Handler.java on Line 92 at android.os.Looper.loop in Looper.java on Line 176 at android.app.ActivityThread.main in ActivityThread.java on Line 5279 at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke in Method.java on Line 511 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run in ZygoteInit.java on Line 1102 at com.android.internal.os.ZygoteInit.main in ZygoteInit.java on Line 869 at dalvik.system.NativeStart.main(Native Method)
That backtrace is not from the current version of the code. Please post a backtrace from the current version.
That was the crash report from the earlier version, but now I am not getting the crash. But the App silently exits. (In reply to comment #2) > That backtrace is not from the current version of the code. Please post a > backtrace from the current version.
I'm not sure if this is the same problem as was originally reported, but I can certainly make it crash. Here is a backtrace, this time in the native code: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 26907] Java_com_artifex_mupdfdemo_MuPDFCore_gotoPageInternal (env=<optimized out>, thiz=<optimized out>, page=0) at jni/mupdf.c:518 518 fz_context *ctx = glo->ctx; (gdb) bt #0 Java_com_artifex_mupdfdemo_MuPDFCore_gotoPageInternal (env=<optimized out>, thiz=<optimized out>, page=0) at jni/mupdf.c:518 #1 0x77177142 in Java_com_artifex_mupdfdemo_MuPDFCore_getAnnotationsInternal (env=0x7713fff0, thiz=0x27500001, pageNumber=0) at jni/mupdf.c:1869 #2 0x41544bd0 in ?? () #3 0x41544bd0 in ?? ()
Hopefully fixed in d5a22b7c76c7c0f67f9350b2a7a5dc030b212421.
commit d5a22b7c76c7c0f67f9350b2a7a5dc030b212421 Author: Matt Holgate <matt@emobix.co.uk> Date: Tue Jun 17 11:14:39 2014 +0100 Fix for bug #694967 - MuPDF crashes after pressing the Back Button while it renders a specific PDF Some async tasks were still trying to access the globals pointer, which had been nulled during shutdown, leading to a crash. Check for NULL and return cleanly in this case. Possibly we should also be calling AsyncTask.get() to wait for the tasks to finish, before nulling the global pointer?