Open rekirt opened 7 years ago
anyone can help me ?
only this pdf file can cause a crash ,other pdf not crash,
329 pages, of Python Standard Library,
Works fine for me.... can even see the chinese.
Maybe post the code you are using as well as the fault.
pdfView.fromFile(downloadFile)
.enableSwipe(true)
.swipeVertical(true)
.enableDoubletap(true)
.defaultPage(0)
.onDraw(new OnDrawListener() {
@Override
public void onLayerDrawn(Canvas canvas, float pageWidth, float pageHeight, int displayedPage) {
}
})
.onLoad(new OnLoadCompleteListener() {
@Override
public void loadComplete(int nbPages) {
}
})
.onPageChange(new OnPageChangeListener() {
@Override
public void onPageChanged(int page, int pageCount) {
}
})
.onError(new OnErrorListener() {
@Override
public void onError(Throwable t) {
Logger.e("---"+t.getMessage());
}
})
.enableAnnotationRendering(false)
.password(null)
.load();
i use this command adb logcat | $NDK/ndk-stack -sym $PROJECT_PATH/obj/local/armeabi ,get a log
Pdfview does not download pdf the url function is internal
the pdf is downloaded to sdcard first, then i use PdfView to load the pdf file
I have the same problem too
07-03 12:00:35.488 3103-3103/? A/DEBUG: #02 pc 00000000001e744c /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (FPDFAPI_FT_Stream_ReadAt+80) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #03 pc 00000000001e6094 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (FPDFAPI_FT_Load_Sfnt_Table+136) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #04 pc 0000000000241e48 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN13CFPF_SkiaFont11GetFontDataEjPhj+36) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #05 pc 000000000023fb90 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN19CFX_AndroidFontInfo11GetFontDataEPvjPhj+36) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #06 pc 0000000000197d0c /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN14CFX_FontMapper13FindSubstFontERK14CFX_ByteStringijiiiP13CFX_SubstFont+2284) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #07 pc 0000000000195d00 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN11CFX_FontMgr13FindSubstFontERK14CFX_ByteStringijiiiP13CFX_SubstFont+184) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #08 pc 00000000001949f8 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN8CFX_Font9LoadSubstERK14CFX_ByteStringijiiii+116) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #09 pc 00000000000db560 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN12CPDF_CIDFont5_LoadEv+1664) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #10 pc 00000000000d3728 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN9CPDF_Font4LoadEv+192) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #11 pc 00000000000d68e4 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN9CPDF_Font11CreateFontFEP13CPDF_DocumentP15CPDF_Dictionary+308) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #12 pc 00000000000e566c /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN16CPDF_DocPageData7GetFontEP15CPDF_Dictionaryi+260) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #13 pc 00000000000ef4c8 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser8FindFontERK14CFX_ByteString+136) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #14 pc 00000000000ef594 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser14Handle_SetFontEv+152) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #15 pc 00000000000ee960 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser10OnOperatorEPKc+204) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #16 pc 00000000000f3fb0 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser5ParseEPKhjj+296) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #17 pc 00000000000f57b4 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN18CPDF_ContentParser8ContinueEP9IFX_Pause+948) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #18 pc 00000000000df618 /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (_ZN16CPDF_PageObjects13ContinueParseEP9IFX_Pause+28) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #19 pc 000000000009f06c /data/app/com.fyjf.all-1/lib/arm64/libmodpdfium.so (FPDF_LoadPage+112) 07-03 12:00:35.488 3103-3103/? A/DEBUG: #20 pc 00000000000117a0 /data/app/com.fyjf.all-1/lib/arm64/libjniPdfium.so
Did anyone have resolve this?
@rekirt this happened with me also.. It was so because I forgot to add proguard rules . I resolved it by adding -keep class com.shockwave.**
to proguard-rules.pro . I hope it will help others.
Crash dump is completed
** Crash dump: ** Build fingerprint: 'HUAWEI/TAG-AL00/HWTAG-L6753:5.1/HUAWEITAG-AL00/C92B157:user/release-keys' pid: 28630, tid: 28630, name: github.barteksc >>> com.github.barteksc <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Stack frame #00 pc 0000000000019d94 /system/lib64/libc.so (memcpy+332) Stack frame #01 pc 000000000008a820 /system/lib64/libc.so (fread+260) Stack frame #02 pc 00000000001e744c /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (FPDFAPI_FT_Stream_ReadAt+80): Routine ?? ??:0 Stack frame #03 pc 00000000001e6094 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (FPDFAPI_FT_Load_Sfnt_Table+136): Routine ?? ??:0 Stack frame #04 pc 0000000000241e48 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN13CFPF_SkiaFont11GetFontDataEjPhj+36): Routine ?? ??:0 Stack frame #05 pc 000000000023fb90 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN19CFX_AndroidFontInfo11GetFontDataEPvjPhj+36): Routine ?? ??:0 Stack frame #06 pc 0000000000197d0c /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN14CFX_FontMapper13FindSubstFontERK14CFX_ByteStringijiiiP13CFX_SubstFont+2284): Routine ?? ??:0 Stack frame #07 pc 0000000000195d00 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN11CFX_FontMgr13FindSubstFontERK14CFX_ByteStringijiiiP13CFX_SubstFont+184): Routine ?? ??:0 Stack frame #08 pc 00000000001949f8 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN8CFX_Font9LoadSubstERK14CFX_ByteStringijiiii+116): Routine ?? ??:0 Stack frame #09 pc 00000000000d6084 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN15CPDF_SimpleFont10LoadCommonEv+964): Routine ?? ??:0 Stack frame #10 pc 00000000000d3728 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN9CPDF_Font4LoadEv+192): Routine ?? ??:0 Stack frame #11 pc 00000000000d68e4 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN9CPDF_Font11CreateFontFEP13CPDF_DocumentP15CPDF_Dictionary+308): Routine ?? ??:0 Stack frame #12 pc 00000000000e566c /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN16CPDF_DocPageData7GetFontEP15CPDF_Dictionaryi+260): Routine ?? ??:0 Stack frame #13 pc 00000000000ef4c8 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser8FindFontERK14CFX_ByteString+136): Routine ?? ??:0 Stack frame #14 pc 00000000000ef594 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser14Handle_SetFontEv+152): Routine ?? ??:0 Stack frame #15 pc 00000000000ee960 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser10OnOperatorEPKc+204): Routine ?? ??:0 Stack frame #16 pc 00000000000f3fb0 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN24CPDF_StreamContentParser5ParseEPKhjj+296): Routine ?? ??:0 Stack frame #17 pc 00000000000f57b4 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN18CPDF_ContentParser8ContinueEP9IFX_Pause+948): Routine ?? ??:0 Stack frame #18 pc 00000000000df618 /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (_ZN16CPDF_PageObjects13ContinueParseEP9IFX_Pause+28): Routine ?? ??:0 Stack frame #19 pc 000000000009f06c /data/app/com.github.barteksc-1/lib/arm64/libmodpdfium.so (FPDF_LoadPage+112): Routine ?? ??:0 Stack frame #20 pc 000000000000cbcc /data/app/com.github.barteksc-1/lib/arm64/libjniPdfium.so: Routine loadPageInternal(_JNIEnv, DocumentFile, int) at /home/lc/workspace/androidstudio/demo/PdfLibDemo/pdflib_jni/src/main/jni/src/mainJNILib.cpp:217 Stack frame #21 pc 00000000000c804c /system/lib64/libart.so (art_quick_generic_jni_trampoline+140) Stack frame #22 pc 00000000000c3184 /system/lib64/libart.so (art_quick_invoke_stub+564) Stack frame #23 pc 000000000029dd1c /system/lib64/libart.so (_ZN3art6mirror9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+248) Stack frame #24 pc 000000000037480c /system/lib64/libart.so (artInterpreterToCompiledCodeBridge+132) Stack frame #25 pc 0000000000204bf4 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_6mirror9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+420) Stack frame #26 pc 00000000000ba338 /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadERNS_12MethodHelperEPKNS_7DexFile8CodeItemERNS11ShadowFrameES2+26800) Stack frame #27 pc 00000000001f17d0 /system/lib64/libart.so (artInterpreterToInterpreterBridge+404) Stack frame #28 pc 0000000000204bf4 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_6mirror9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+420) Stack frame #29 pc 00000000000b97c8 /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadERNS_12MethodHelperEPKNS_7DexFile8CodeItemERNS11ShadowFrameES2+23872) Stack frame #30 pc 00000000001f17d0 /system/lib64/libart.so (artInterpreterToInterpreterBridge+404) Stack frame #31 pc 0000000000204bf4 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_6mirror9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+420) Stack frame #32 pc 00000000000b97c8 /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadERNS_12MethodHelperEPKNS_7DexFile8CodeItemERNS11ShadowFrameES2+23872) Stack frame #33 pc 00000000001f17d0 /system/lib64/libart.so (artInterpreterToInterpreterBridge+404) Stack frame #34 pc 0000000000204bf4 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_6mirror9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+420) Stack frame #35 pc 00000000000b97c8 /system/lib64/libart.so (_ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadERNS_12MethodHelperEPKNS_7DexFile8CodeItemERNS11ShadowFrameES2+23872) Stack frame #36 pc 00000000001e7c1c /system/lib64/libart.so (_ZN3art11interpreter24EnterInterpreterFromStubEPNS_6ThreadERNS_12MethodHelperEPKNS_7DexFile8CodeItemERNS_11ShadowFrameE+132) Stack frame #37 pc 00000000003a6994 /system/lib64/libart.so (artQuickToInterpreterBridge+604) Stack frame #38 pc 00000000000c81a8 /system/lib64/libart.so (art_quick_to_interpreter_bridge+88) Stack frame #39 pc 0000000000b75044 /data/dalvik-cache/arm64/system@framework@boot.oat