question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android 9: App crashes if hardware acceleration is enabled

See original GitHub issue

Bug 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 image

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:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:49 (4 by maintainers)

github_iconTop GitHub Comments

40reactions
dimasdanzcommented, Jul 5, 2019

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 setting androidHardwareAccelerationDisabled prop

<WebView
  androidHardwareAccelerationDisabled
  source={source}
/>
13reactions
Razorholtcommented, Feb 18, 2020

Disabling the animation in React-Navigation worked for me. If you are on React-Navigation 5, here is how to do it:

<NavigationContainer>
     <Stack.Navigator initialRouteName="HomeScreen">
          <Stack.Screen
            name="HomeScreen"
            component={HomeScreen}
            options={{
              animationEnabled: false,
            }}
          />
     </Stack.Navigator>
</NavigationContainer>

https://stackoverflow.com/a/60241167/2309061

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hardware acceleration | Android Developers
When hardware acceleration is enabled, the Android framework utilizes a new drawing model that utilizes display lists to render your application ...
Read more >
Android: Application being forced to use hardware acceleration?
My app uses Canvas methods which are not supported by hardware acceleration (clipPath, drawPicture), so I do not enable hardware accelaration.
Read more >
Webview crash heavily on Android with Adreno GPU devices ...
Adreno GPU has buggy drivers. Webview crashes heavily if hardware acceleration for canvas rendering is enabled.
Read more >
Hello whenever I try to connect to a google account it crashes ...
Try running Android x86 with hardware acceleration off/disabled. Your device is going to run very slowly, but you should be able to reach...
Read more >
Few questions (hardware acceleration, changing device ...
The Antutu 3D test crashes and games like "Temple run" or "Subway surfer" ... From everything I've read, there's no support for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found