Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

App Crashing on Android Version 8.0.0 & Version 8.1.0 #93

Open
SachinA94 opened this issue Jul 26, 2021 · 1 comment
Open

App Crashing on Android Version 8.0.0 & Version 8.1.0 #93

SachinA94 opened this issue Jul 26, 2021 · 1 comment

Comments

@SachinA94
Copy link

Description

Recently getting lots of crash report from my users that their app is suddenly crashing while using. I tried multiple solutions, but nothing is solving this issue. These crashes are only happening on Oreo devices only.

React Native version:

System:
OS: macOS 11.3.1
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 81.34 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.1.0 - /usr/local/bin/node
Yarn: Not Found
npm: 7.11.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.3
System Images: android-22 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Firebase Crashlytics error log

Fatal Exception: java.lang.RuntimeException
Unable to resume activity {<package_name>/<package_name>.MainActivity}: android.view.Surface$OutOfResourcesException
android.app.ActivityThread.performResumeActivity

Fatal Exception: java.lang.RuntimeException: Unable to resume activity {<package_name>/<package_name>.MainActivity}: android.view.Surface$OutOfResourcesException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3741)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3781)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1749)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6748)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:875)

Caused by android.view.Surface$OutOfResourcesException
at android.view.Surface.nativeLockCanvas(Surface.java)
at android.view.Surface.lockCanvas(Surface.java:337)
at com.reactnativecommunity.art.e.b(:14)
at com.reactnativecommunity.art.e.onHostResume(:1)
at com.facebook.react.bridge.ReactContext.onHostResume(:34)
at com.facebook.react.r.E(:23)
at com.facebook.react.r.L(:39)
at com.facebook.react.r.M(:5)
at com.facebook.react.q.j(:29)
at com.facebook.react.n.t(:2)
at com.facebook.react.m.onResume(:5)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1360)
at android.app.Activity.performResume(Activity.java:7249)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3716)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3781)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1749)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:6748)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:875

@SachinA94
Copy link
Author

I figured it out there is a drawOutput method in file ARTSurfaceViewShadowNode behind this issue. To temp. resolve, i putted a check to stop call drawOutput method on Oreo devices. If anyone knows, how to get rid of these crashes, please share.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant