joniks / Android-MuPDF

MuPDF usage for magazine reading
GNU Affero General Public License v3.0
184 stars 74 forks source link

heap corruption detected by dlfree #3

Open Gustik opened 10 years ago

Gustik commented 10 years ago

samsung SM-t5250 galaxy tab pro I work with the large pdf files (100mb-200mb) that include scanned images MuPDFActivity periodically crash with a this log:

153/bbtech.com.gdocuments E/libmupdf﹕ Rendering page(55)=986x1394 patch=[0,0,986,1394] 10-07 12:48:29.766 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ error: Render aborted 10-07 12:48:29.766 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ Render failed 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments D/dalvikvm﹕ GC_FOR_ALLOC freed 5425K, 37% free 71752K/113600K, paused 14ms, total 14ms 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments I/libmupdf﹕ Drop page 58 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ Goto page 56... 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments I/libmupdf﹕ Load page 56 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ PageWidth=1190 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ PageHeight=1682 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments I/libmupdf﹕ In native method 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments I/libmupdf﹕ Checking format 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments I/libmupdf﹕ locking pixels 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments E/libmupdf﹕ Rendering page(56)=986x1394 patch=[0,0,986,1394] 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments A/libc﹕ heap corruption detected by dlfree 10-07 12:48:29.786 1917-2153/bbtech.com.gdocuments A/libc﹕ Fatal signal 6 (SIGABRT) at 0x0000077d (code=-6), thread 2153 (AsyncTask #3) 10-07 12:48:30.426 3209-3209/bbtech.com.gdocuments W/ApplicationPackageManager﹕ getCSCPackageItemText() 10-07 12:48:30.466 3209-3209/bbtech.com.gdocuments E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView 10-07 12:48:30.506 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ Get MotionRecognitionManager 10-07 12:48:30.526 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4 10-07 12:48:30.526 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ unregisterIRListener() is called 10-07 12:48:30.536 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ onVisibilityChanged() is called, visibility : 0 10-07 12:48:30.536 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ unregisterIRListener() is called 10-07 12:48:30.566 3209-3209/bbtech.com.gdocuments I/Adreno-EGL﹕ : EGL 1.4 QUALCOMM build: () OpenGL ES Shader Compiler Version: E031.24.00.06 Build Date: 01/14/14 Tue Local Branch: AU56_preserved_CAC_shader_repixel_zeroTimeout Remote Branch: Local Patches: Reconstruct Branch: 10-07 12:48:30.586 3209-3209/bbtech.com.gdocuments D/OpenGLRenderer﹕ Enabling debug mode 0 10-07 12:48:30.606 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ unregisterIRListener() is called 10-07 12:48:30.606 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ onVisibilityChanged() is called, visibility : 4 10-07 12:48:30.606 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ unregisterIRListener() is called 10-07 12:48:30.646 3209-3209/bbtech.com.gdocuments D/AbsListView﹕ unregisterIRListener() is called

sometimes APP crash with this log

10-07 12:19:57.216 31716-31845/bbtech.com.gdocuments E/libmupdf﹕ Rendering page(6)=986x1394 patch=[0,0,986,1394] 10-07 12:19:57.216 31716-31845/bbtech.com.gdocuments A/libc﹕ heap corruption detected by dlfree 10-07 12:19:57.216 31716-31845/bbtech.com.gdocuments A/libc﹕ Fatal signal 6 (SIGABRT) at 0x00007be4 (code=-6), thread 31845 (AsyncTask #3)

ps: sorry for my bad english

Gustik commented 10 years ago

In portrait mode the application does not crash. As a temporary solution, I did the following: in MuPDFActivity.java on 455 line:

if(mOrientation == Configuration.ORIENTATION_LANDSCAPE) {
    // core.setDisplayPages(2); (455 line)
    core.setDisplayPages(1);
} else {
    core.setDisplayPages(1);
}
saipavan1223 commented 8 years ago

Hi. I'm exactly facing the same issue but your solution doesn't help me because I have to show two pages in landscape for sure. Is there any other workaround.please help me. @Gustik @joniks

saipavan1223 commented 8 years ago

Can anyone help me out with this please. @joniks