Android 9: App crashes if hardware acceleration is enabled
See original GitHub issueBug description: Our app crashes on Android 9 if the hardware acceleration was used in the webview. If I disable the hardware acceleration on the embedded webviews the app works fine. If I disable the acceleration in the AndroidManifest the app also works without crashes. So I think it has something to do with the webview implementation and their usage of the hardware acceleration on Android 9.
To Reproduce: The bug occurse in our currently productive app. The repository could be found here: postillonmedia/app
Expected behavior: The app should not crash when the acceleration is enabled 😄
Screenshots/Videos/Traces: Current reports of the Google-Play console
One of the traces:
05-14 23:07:01.963 10286 7866 22340 W com.postillon: 0xebadde09 skipped times: 0
05-14 23:07:01.964 10286 7866 22340 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c in tid 22340 (RenderThread), pid 7866 (com.postillon)
05-14 23:07:02.049 10286 22987 22987 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
05-14 23:07:02.051 1058 5437 5437 I /system/bin/tombstoned: received crash request for pid 22340
05-14 23:07:02.052 10286 22987 22987 I crash_dump32: performing dump of process 7866 (target tid = 22340)
05-14 23:07:02.065 10286 22987 22987 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-14 23:07:02.065 10286 22987 22987 F DEBUG : Build fingerprint: 'samsung/beyond2lteeea/beyond2:9/PPR1.180610.011/G975FXXU1ASD5:user/release-keys'
05-14 23:07:02.065 10286 22987 22987 F DEBUG : Revision: '26'
05-14 23:07:02.065 10286 22987 22987 F DEBUG : ABI: 'arm'
05-14 23:07:02.065 10286 22987 22987 F DEBUG : pid: 7866, tid: 22340, name: RenderThread >>> com.postillon <<<
05-14 23:07:02.065 10286 22987 22987 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1c
05-14 23:07:02.065 10286 22987 22987 F DEBUG : Cause: null pointer dereference
05-14 23:07:02.065 10286 22987 22987 F DEBUG : r0 00000000 r1 e1b50d80 r2 eb08606d r3 00000000
05-14 23:07:02.065 10286 22987 22987 F DEBUG : r4 00000000 r5 00000000 r6 a7aee7e0 r7 00000000
05-14 23:07:02.065 10286 22987 22987 F DEBUG : r8 00000000 r9 00000000 r10 00000000 r11 00000000
05-14 23:07:02.065 10286 22987 22987 F DEBUG : ip eb5a3914 sp c82b9fe0 lr eaffcabd pc eb35e4b4
05-14 23:07:02.112 10286 22987 22987 F DEBUG :
05-14 23:07:02.112 10286 22987 22987 F DEBUG : backtrace:
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #00 pc 003f14b4 /system/lib/libhwui.so (SkSurface::getCanvas()+4)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #01 pc 0008fab9 /system/lib/libhwui.so (android::uirenderer::skiapipeline::GLFunctorDrawable::onDraw(SkCanvas*)+1192)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #02 pc 0035a3b5 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+212)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #03 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #04 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #05 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #06 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #07 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #08 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #09 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #10 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #11 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #12 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #13 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #14 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #15 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #16 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #17 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #18 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #19 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #20 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #21 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.112 10286 22987 22987 F DEBUG : #22 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #23 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #24 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #25 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #26 pc 0035a345 /system/lib/libhwui.so (SkDrawable::draw(SkCanvas*, SkMatrix const*)+100)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #27 pc 0035a967 /system/lib/libhwui.so (SkLiteDL::draw(SkCanvas*) const+154)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #28 pc 0034273d /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::drawContent(SkCanvas*) const+272)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #29 pc 00342a53 /system/lib/libhwui.so (android::uirenderer::skiapipeline::RenderNodeDrawable::forceDraw(SkCanvas*)+202)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #30 pc 00097a0d /system/lib/libhwui.so (android::uirenderer::skiapipeline::SkiaPipeline::renderLayersImpl(android::uirenderer::LayerUpdateQueue const&, bool, bool)+812)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #31 pc 00374d81 /system/lib/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>)+40)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #32 pc 00374497 /system/lib/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::RenderNode>>
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #33 pc 000a0963 /system/lib/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+150)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #34 pc 00377791 /system/lib/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+576)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #35 pc 00341a9b /system/lib/libhwui.so (android::uirenderer::WorkQueue::process()+122)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #36 pc 000aa13f /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+178)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #37 pc 0000c08b /system/lib/libutils.so (android::Thread::_threadLoop(void*)+166)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #38 pc 00064949 /system/lib/libc.so (__pthread_start(void*)+140)
05-14 23:07:02.113 10286 22987 22987 F DEBUG : #39 pc 0001e3c5 /system/lib/libc.so (__start_thread+24)
Environment:
- OS: Android
- OS version: 9
- react-native version: 0.59.8
- react-native-webview version: 5.8.2
Known devices
-
Galaxy Note9 (crownlte)
-
Galaxy Note8 (greatlte)
-
Galaxy S9 (starlte)
-
Galaxy S9+ (star2lte)
-
Galaxy S8 (dreamlte)
-
Galaxy S8+ (dream2lte)
-
P20 Pro (HWCLT)
-
Mate 10 Pro (HWBLA)
-
Mate 20 Pro (HWLYA)
-
P20 (HWEML)
-
Mate 20 (HWHMA)
-
Honor 10 (HWCOL)
-
Honor Play (HWCOR)
-
Mate 10 (HWALP)
-
Honor V10 (HWBKL)
-
P10 (HWVTR)
-
Honor 9 (HWSTF)
-
Honor 8X (HWJSN-H)
-
HONOR V20 (HWPCT)
-
HUAWEI P smart 2019 (HWPOT-H)
-
Mate 9 (HWMHA)
-
HUAWEI P30 lite (HWMAR)
-
Honor 10 Lite (HWHRY-H)
-
P10 Plus (HWVKY)
-
Mate 20 lite (HWSNE)
-
Xperia XZ1 Compact (G8441)
-
Xperia XZ1 (G8341)
-
Xperia XA2 (H3113)
-
Xperia XZ Premium (G8141)
-
Xperia XA2 Ultra (H4213)
-
Xperia 10 (I4113)
-
Pixel (sailfish)
-
Pixel 2 (walleye)
-
Pixel 2 XL (taimen)
-
Pixel 3 (blueline)
-
Pixel 3 XL (crosshatch)
-
moto g(6) (ali_n)
-
moto g(6) plus (evert_n)
-
moto g(6) play (aljeter)
All devices runs Android 9
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:49 (4 by maintainers)
Top GitHub Comments
Got the same issue here (Android 8, RN 0.59.10, RNN 2.22.3), one way to “fix” it without disabling animation on react-native-navigation or disabling it, application wide (via
android:hardwareAccelerated="false"
on manifest) is to just disable hw acceleration only on webview by settingandroidHardwareAccelerationDisabled
propDisabling the animation in React-Navigation worked for me. If you are on React-Navigation 5, here is how to do it:
https://stackoverflow.com/a/60241167/2309061