Native C++ crashes on Android 9 on React Native 0.59
See original GitHub issueWe recently upgraded our app from React Native 0.56
to 0.59
and started seeing crashes when navigating between screens on a test device Pixel 3 running Android 9 - we can also reproduce on a Pixel 3 emulator.
The cashes themselves are very consistent and happen often. Disabling useScreens
on Android stops the crashes from happening. I will work on trying to create a repro project but for now all I have is the stacktrack which I apologize for in advance as I realize how unhelpful that is but thought there might be some value in opening an issue to give some visibility in case it is a general issue and not something tied to the specifics of our app setup.
The crash itself is happening in libhwui.so
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: Build fingerprint: 'google/crosshatch/crosshatch:9/PD1A.180720.030/4972053:user/release-keys'
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: Revision: 'MP1.0'
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: ABI: 'arm64'
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: pid: 32138, tid: 32225, name: RenderThread >>> com.bloomberg.android.plus <<<
2019-05-28 17:58:14.490 32395-32395/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: Cause: null pointer dereference
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x0 0000000000000000 x1 00000075caa43ae4 x2 0000000000000002 x3 000000751f6da518
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x4 0000000000000110 x5 000000751f6d8f14 x6 000000751f6d8f10 x7 000000751f6d8f0c
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x8 0000000000000000 x9 0000000000000000 x10 0000000000000000 x11 0000000000000000
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x12 ffffffffffe961b0 x13 000000751f6ed588 x14 0000000000000000 x15 0000000000000000
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x16 00000075cad6f1d8 x17 00000075cab140b8 x18 0000000000000001 x19 0000000000000000
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x20 0000000000000000 x21 00000075176497e0 x22 0000000000000003 x23 0000000000000000
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x24 0000000000000000 x25 000000751f6ed588 x26 0000000000000000 x27 0000000000000000
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: x28 0000000000000000 x29 000000751f6da4e0
2019-05-28 17:58:14.491 32395-32395/? A/DEBUG: sp 000000751f6da4d0 lr 00000075ca6d53d0 pc 00000075cab140c8
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: backtrace:
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #00 pc 00000000005320c8 /system/lib64/libhwui.so (SkSurface::getCanvas()+16)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #01 pc 00000000000f33cc /system/lib64/libhwui.so (android::uirenderer::skiapipeline::GLFunctorDrawable::onDraw(SkCanvas*)+1668)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #02 pc 000000000044e04c /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+352)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #03 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #04 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #05 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #06 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #07 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #08 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #09 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #10 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #11 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #12 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #13 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #14 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #15 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #16 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #17 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #18 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #19 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #20 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #21 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #22 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #23 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #24 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #25 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #26 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #27 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #28 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #29 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #30 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #31 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #32 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #33 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #34 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #35 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #36 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #37 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #38 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #39 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #40 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #41 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #42 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #43 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #44 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #45 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #46 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #47 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #48 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #49 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #50 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #51 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #52 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #53 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #54 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #55 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #56 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #57 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #58 pc 000000000044df80 /system/lib64/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+148)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #59 pc 000000000044e800 /system/lib64/libhwui.so (SkLiteDL::draw(SkCanvas*) const+204)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #60 pc 000000000042f3e4 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+292)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #61 pc 000000000042f794 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+252)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #62 pc 00000000000fc17c /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderLayersImpl(android::uirenderer::LayerUpdateQueue const&, bool, bool)+788)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #63 pc 0000000000472e04 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderFrame(android::uirenderer::LayerUpdateQueue const&, SkRect const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::RenderNode>>> const&, bool, bool, android::uirenderer::Rect const&, sk_sp<SkSurface>)+96)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #64 pc 0000000000472050 /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::draw(android::uirenderer::renderthread::Frame const&, SkRect const&, SkRect const&, android::uirenderer::FrameBuilder::LightGeometry const&, android::uirenderer::LayerUpdateQueue*, android::uirenderer::Rect const&, bool, bool, android::uirenderer::BakedOpRenderer::LightInfo const&, std::__1::vector<android::sp<android::uirenderer::RenderNode>, std::__1::allocator<android::sp<android::uirenderer::Re
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #65 pc 00000000001072a0 /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+188)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #66 pc 0000000000476ecc /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+644)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #67 pc 000000000042e380 /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+168)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #68 pc 0000000000114620 /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+240)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #69 pc 000000000000f934 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #70 pc 00000000000821e0 /system/lib64/libc.so (__pthread_start(void*)+36)
2019-05-28 17:58:14.523 32395-32395/? A/DEBUG: #71 pc 0000000000023178 /system/lib64/libc.so (__start_thread+68)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:32 (7 by maintainers)
Top Results From Across the Web
React native 0.59.9 app crashing in android - Stack Overflow
The IOS is doing okay and running perfectly. React Native Environment Info: System: OS: Windows 10 CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU ......
Read more >Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here,...
Read more >React Native SDK Troubleshooting - Visual Studio App Center
'React/RCTDefines.h' file not found; React Native link command unrecognized; Build error such as 'AppCenterCrashes/MSACErrorReport.h' file ...
Read more >react-native-gesture-handler - npm
Declarative API exposing platform native touch and gesture system to React Native. ... React Native Gesture Handler provides native-driven gesture ...
Read more >React native app crashing on android 12+ on emulator-React ...
[Solved]-React native app crashing on android 12+ on emulator-React Native. Search. score:0. // fix for crash API 31 implementation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing this since #607 is merged. Comment here please if the crash appears after that commit and applying workaround for
native-stack
.Same crash on Android 9:
After remove this in App.js, crash stop: