react-native-pdf
react-native-pdf copied to clipboard
Android: Native crash app error "PDF renderer"
What react-native version are you using?
0.74.2
What react-native-pdf version are you using?
6.7.5
What platform does your issue occur on? (android/ios/both) Android
// android/app/build.gradle def enableProguardInReleaseBuilds = true
After launching the application on play store, it is showing native crash error:
error logs:
Build fingerprint: 'google/redfin/redfin:11/RQ3A.211001.001/7641976:user/release-keys' Revision: 'MP1.0' ABI: 'arm64' Timestamp: 2024-06-25 22:19:18-0700 pid: 22844, tid: 27413, name: PDF renderer >>> com.packagename <<< uid: 10275 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x88 Cause: null pointer dereference x0 b40000750a283e50 x1 0000000000000000 x2 000000739954d538 x3 0000000000000048 x4 0000000000000010 x5 000000740a0f2580 x6 000000743a11c080 x7 000000743a134600 x8 0000000000000000 x9 0000000000000060 x10 0000000000001f44 x11 ae49000000048105 x12 00000000f3d9ea82 x13 ae49000000048105 x14 000000000000c000 x15 00000000ebad6a89 x16 00000072838e4f70 x17 00000072837bfb58 x18 00000073978cc000 x19 b40000750a283e50 x20 b40000756a019758 x21 b40000755a38fcb8 x22 b40000755a318298 x23 b40000755a38ecb8 x24 000000738c3ec560 x25 000000739954f000 x26 000000000000092b x27 0000000000000003 x28 000000739954d730 x29 000000739954d4d0 lr 000000728376b060 sp 000000739954d4d0 pc 00000072837bfb84 pst 0000000060000000 backtrace: #00 pc 00000000003edb84 /data/app/~~alypmSSf_csALBpsj5707Q==/com.packagename-zgsaYVcZo8epa5rusKfDeA==/split_config.arm64_v8a.apk!libpdfium.cr.so (offset 0xb70000) (FT_Done_Face+44) (BuildId: 991a8c73152ed28c)
I don't know what to do, please help!!
Not sure if this is related, but I got a quite similar crash with symbols:
Crashed: Thread: SIGSEGV 0x4201f33342240000
#00 pc 0x34a5dc libpdfium.cr.so (CPDF_Document::MaybePurgeImage(unsigned int)) (BuildId: 991a8c73152ed28c)
#01 pc 0x328bec libpdfium.cr.so (CPDF_ImageObject::MaybePurgeCache()) (BuildId: 991a8c73152ed28c)
#02 pc 0x328b78 libpdfium.cr.so (CPDF_ImageObject::~CPDF_ImageObject()) (BuildId: 991a8c73152ed28c)
#03 pc 0x328c30 libpdfium.cr.so (CPDF_ImageObject::~CPDF_ImageObject()) (BuildId: 991a8c73152ed28c)
#04 pc 0x32ef18 libpdfium.cr.so (CFPF_SkiaPathFont::~CFPF_SkiaPathFont()) (BuildId: 991a8c73152ed28c)
#05 pc 0x32e558 libpdfium.cr.so (CPDF_PageObjectHolder::~CPDF_PageObjectHolder()) (BuildId: 991a8c73152ed28c)
#06 pc 0x32e4f0 libpdfium.cr.so (CPDF_PageObjectHolder::~CPDF_PageObjectHolder()) (BuildId: 991a8c73152ed28c)
#07 pc 0x32b6bc libpdfium.cr.so (CPDF_Page::~CPDF_Page()) (BuildId: 991a8c73152ed28c)
#08 pc 0x16984 libpdfiumandroid.so (Java_io_legere_pdfiumandroid_PdfPage_nativeClosePage) (BuildId: 9e0f386dec845b7ef29ae68ba37ebfcceec87832)
#09 pc 0x762d915f14
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f6665722f678e in tid 24894 (PDF renderer), pid 23950 (dar.development)
@mbpictures How is the crash going? Has it been resolved?
we have also had this issue on around 0.4% devices. On play store Crash reports, we are getting same issue.
we are able to recreate this issue
- if you have a very long pdf like 40+ page and then you scroll very fast
- if you switch screens between view pdf and any other very fast this crash happen
pid: 0, tid: 9478 >>> com.maxcode.srjajoriya <<<
backtrace: #00 pc 0x00000000003edb84 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (FT_Done_Face+44) (BuildId: 991a8c73152ed28c) #01 pc 0x000000000039905c /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CFX_Face::~CFX_Face()+40) (BuildId: 991a8c73152ed28c) #02 pc 0x0000000000399088 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CFX_Face::~CFX_Face()+20) (BuildId: 991a8c73152ed28c) #03 pc 0x000000000039f8c0 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CFX_GlyphCache::~CFX_GlyphCache()+44) (BuildId: 991a8c73152ed28c) #04 pc 0x000000000039f8ec /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CFX_GlyphCache::~CFX_GlyphCache()+20) (BuildId: 991a8c73152ed28c) #05 pc 0x000000000039a684 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CFX_Font::~CFX_Font()+92) (BuildId: 991a8c73152ed28c) #06 pc 0x000000000048af90 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_Font::~CPDF_Font()+116) (BuildId: 991a8c73152ed28c) #07 pc 0x0000000000486f80 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_CIDFont::~CPDF_CIDFont()+20) (BuildId: 991a8c73152ed28c) #08 pc 0x000000000033d5a8 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_TextState::TextData::~TextData()+20) (BuildId: 991a8c73152ed28c) #09 pc 0x00000000003266e8 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_GraphicStates::~CPDF_GraphicStates()+52) (BuildId: 991a8c73152ed28c) #10 pc 0x000000000033c1b8 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_TextObject::~CPDF_TextObject()+20) (BuildId: 991a8c73152ed28c) #11 pc 0x000000000032ef18 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (BuildId: 991a8c73152ed28c) #12 pc 0x000000000032e558 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (BuildId: 991a8c73152ed28c) #13 pc 0x000000000032e4f0 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_PageObjectHolder::~CPDF_PageObjectHolder()+48) (BuildId: 991a8c73152ed28c) #14 pc 0x000000000032b6bc /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfium.cr.so (CPDF_Page::~CPDF_Page()+20) (BuildId: 991a8c73152ed28c) #15 pc 0x0000000000016984 /data/app/~~78eiRoLZxxc_9lnE_UAnew==/com.maxcode.srjajoriya-t43RsE5UN-rWFfHjdffjCQ==/split_config.arm64_v8a.apk!libpdfiumandroid.so (Java_io_legere_pdfiumandroid_PdfPage_nativeClosePage+40) (BuildId: 9e0f386dec845b7ef29ae68ba37ebfcceec87832) #16 pc 0x00000000003f03e0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+112)
+1
Same issues, in a app i have top tab screens, if i quickly switch tabs then it's crashing the app.
Crashlytics
null pointer dereference: SIGSEGV 0x0000000000000088 #00 pc 0x342ca4 libpdfium.so (BuildId: fded84e6a2191feb) #01 pc 0x2dba9c libpdfium.so (BuildId: fded84e6a2191feb) #02 pc 0x2dba9c libpdfium.so (BuildId: fded84e6a2191feb) #03 pc 0x2e06ac libpdfium.so (BuildId: fded84e6a2191feb) #04 pc 0x2e06e0 libpdfium.so (BuildId: fded84e6a2191feb) #05 pc 0x2dc004 libpdfium.so (BuildId: fded84e6a2191feb) #06 pc 0x3ecfe4 libpdfium.so (BuildId: fded84e6a2191feb) #07 pc 0x3e8098 libpdfium.so (BuildId: fded84e6a2191feb) #08 pc 0x266560 libpdfium.so (BuildId: fded84e6a2191feb) #09 pc 0x2487b8 libpdfium.so (BuildId: fded84e6a2191feb) #10 pc 0x264fe8 libpdfium.so (BuildId: fded84e6a2191feb) #11 pc 0x252de4 libpdfium.so (BuildId: fded84e6a2191feb) #12 pc 0x252c1c libpdfium.so (BuildId: fded84e6a2191feb) #13 pc 0x24f180 libpdfium.so (BuildId: fded84e6a2191feb) #14 pc 0x31940 libpdfiumandroid.so (BuildId: 740a7710c8e58196ff61c9808eae1a9aa1b80789) #15 pc 0x717dbd80 #16 pc 0x751d9c6d98 #17 pc 0x751d6ddcbc #18 pc 0x751d9c72e8 #19 pc 0x751d4a5a68 #20 pc 0x751d99fbd8 #21 pc 0x751d4a5fb4 #22 pc 0x71d5b29c #23 pc 0x71d62854 #24 pc 0x71d62290 #25 pc 0x71d5dc00 #26 pc 0x631b8 libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #27 pc 0x542f4 libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #28 pc 0x10f2fd libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #29 pc 0xc0e17c libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #30 pc 0xc0cffc libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #31 pc 0x368774 libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #32 pc 0x353f24 libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #33 pc 0x63498c libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #34 pc 0x947748 libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #35 pc 0xc0e17c libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #36 pc 0x636e80 libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92) #37 pc 0xa39a0 libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #38 pc 0xa3a68 libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #39 pc 0x95ecc libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #40 pc 0xa39a0 libc.so (BuildId: a3cde331295ff116d9c0d5e2198af1eb) #41 pc 0x172d24 ld-android.so (BuildId: 477156cba2cddb4d01daea560a7b79b0) #42 pc 0x173024 ld-android.so (BuildId: 477156cba2cddb4d01daea560a7b79b0) #43 pc 0x63693c libart.so (BuildId: 4ccb65ae9ac5ad5da3af5a342d5b0b92)
Any update here? I am also facing the same issue on RN v0.79.2 Old Architecture and react-native-pdf v6.7.7.
same issue here
https://github.com/johngray1965/PdfiumAndroidKt/issues/37
I'm the maintainer of PdfiumAndroidKt. On the crash, our role is taking the page reference we were given, and passing it the underlying Pdfium call. This is very little room for PdfiumAndroidKt do anything wrong. The fact that people are seeing this when scrolling fast makes me think you have resource management issue. The likely culprit is closing the same page more than once or otherwise passing a page that's not valid. There's some chance it's in the underlying Pdfium libraries, I will look into updating some time soon.
So somebody submitted a PR for PdfiumAndroidKt. We have checks to make sure it's valid page, and we synchronize the calls to PDFium, but it turns out if you really pound on it from multiple threads you could get it to do an operation on closed page. I'm waiting for the PR to finish running the code checks. There's an unrelated PR I'm merging in and I'll updating the native libraries to the latest. I should have an update out later today.
There's a new version of PdfiumAndroidKt: implementation("io.legere:pdfiumandroid:1.0.33")
Is this fixed? I see that in 7.0.1 pdfiumandroid was upgraded (presumably this fixes the issue), but in 7.0.2 it was reverted.