-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crashes on Android (release variant) with Canvas: trying to draw too large
in logcat
#23479
Comments
Hello there 👋 this issue doesn't have a repro (which means, a Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗 |
I have the same issue .. I uploaded a new version (of my app) on the play store, it has a lot of changes to the previous code and new feature as well. The error only occurs on some devices, does not occur on most. I have no way to reproduce the error. I don't even know why it's throwing this error. |
same issue here using expo |
same the bug. |
Same bug. Using expo 33 (latest release). It only happens on Android 7 (Nougat). |
Thank you all for replying to our issue. Eventually, we upgraded |
@EgidioCaprino What version of |
This error happened again for us with React Native Stack trace
Can you please re-open this issue? |
I'm also getting this issue on Android 8.0, react-native 59.8. Only happens in a release build of the application. Stack Trace``` Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(121096800bytes) bitmap. at android.view.DisplayListCanvas.throwIfCannotDraw + 229(DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap + 97(RecordingCanvas.java:97) at android.graphics.drawable.BitmapDrawable.draw + 529(BitmapDrawable.java:529) at com.facebook.drawee.drawable.RoundedDrawable.draw + 376(RoundedDrawable.java:376) at com.facebook.drawee.drawable.RoundedBitmapDrawable.draw + 46(RoundedBitmapDrawable.java:46) at com.facebook.drawee.drawable.ForwardingDrawable.draw + 145(ForwardingDrawable.java:145) at com.facebook.drawee.drawable.ScaleTypeDrawable.draw + 123(ScaleTypeDrawable.java:123) at com.facebook.drawee.drawable.FadeDrawable.drawDrawableWithAlpha + 302(FadeDrawable.java:302) at com.facebook.drawee.drawable.FadeDrawable.draw + 289(FadeDrawable.java:289) at com.facebook.drawee.drawable.ForwardingDrawable.draw + 145(ForwardingDrawable.java:145) at com.facebook.drawee.generic.RootDrawable.draw + 81(RootDrawable.java:81) at android.widget.ImageView.onDraw + 1349(ImageView.java:1349) at android.view.View.draw + 20370(View.java:20370) at android.view.View.updateDisplayListIfDirty + 19315(View.java:19315) at android.view.View.draw + 20093(View.java:20093) at android.view.ViewGroup.drawChild + 4421(ViewGroup.java:4421) at android.view.ViewGroup.dispatchDraw + 4207(ViewGroup.java:4207) at com.facebook.react.views.view.ReactViewGroup.dispatchDraw + 684(ReactViewGroup.java:684) at android.view.View.updateDisplayListIfDirty + 19306(View.java:19306) at android.view.View.draw + 20093(View.java:20093) at android.view.ViewGroup.drawChild + 4421(ViewGroup.java:4421) at android.view.ViewGroup.dispatchDraw + 4207(ViewGroup.java:4207) at android.view.View.draw + 20373(View.java:20373) at android.widget.ScrollView.draw + 2731(ScrollView.java:2731) at com.facebook.react.views.scroll.ReactScrollView.draw + 400(ReactScrollView.java:400) at android.view.View.updateDisplayListIfDirty + 19315(View.java:19315) at android.view.View.draw + 20093(View.java:20093) at android.view.ViewGroup.drawChild + 4421(ViewGroup.java:4421) at android.view.ViewGroup.dispatchDraw + 4207(ViewGroup.java:4207) at com.facebook.react.views.view.ReactViewGroup.dispatchDraw + 684(ReactViewGroup.java:684) at android.view.View.updateDisplayListIfDirty + 19306(View.java:19306) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ViewGroup.recreateChildDisplayList + 4405(ViewGroup.java:4405) at android.view.ViewGroup.dispatchGetDisplayList + 4385(ViewGroup.java:4385) at android.view.View.updateDisplayListIfDirty + 19274(View.java:19274) at android.view.ThreadedRenderer.updateViewTreeDisplayList + 686(ThreadedRenderer.java:686) at android.view.ThreadedRenderer.updateRootDisplayList + 692(ThreadedRenderer.java:692) at android.view.ThreadedRenderer.draw + 800(ThreadedRenderer.java:800) at android.view.ViewRootImpl.draw + 3496(ViewRootImpl.java:3496) at android.view.ViewRootImpl.performDraw + 3283(ViewRootImpl.java:3283) at android.view.ViewRootImpl.performTraversals + 2818(ViewRootImpl.java:2818) at android.view.ViewRootImpl.doTraversal + 1780(ViewRootImpl.java:1780) at android.view.ViewRootImpl$TraversalRunnable.run + 7827(ViewRootImpl.java:7827) at android.view.Choreographer$CallbackRecord.run + 911(Choreographer.java:911) at android.view.Choreographer.doCallbacks + 723(Choreographer.java:723) at android.view.Choreographer.doFrame + 658(Choreographer.java:658) at android.view.Choreographer$FrameDisplayEventReceiver.run + 897(Choreographer.java:897) at android.os.Handler.handleCallback + 789(Handler.java:789) at android.os.Handler.dispatchMessage + 98(Handler.java:98) at android.os.Looper.loop + 164(Looper.java:164) at android.app.ActivityThread.main + 6944(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.Zygote$MethodAndArgsCaller.run + 327(Zygote.java:327) at com.android.internal.os.ZygoteInit.main + 1374(ZygoteInit.java:1374) ``` |
We got this error again today. Can you please reopen this issue? |
Its still there in react-native: "0.60.6" |
Hello, apart from the error that I also have, has anyone opted for an alternative solution? I have to show the image but I don't know how to really solve it in react-native: "0.60.6" |
Getting this error rn 0.61.5, not expo. I've got it from Crashlytics. |
Initially we were experiencing this crash too when we only had a single splash screen asset in our android project. We solved this issue by adding additional splash screen assets into our android project based on the specs available here : https://stackoverflow.com/a/27125893 |
🐛 Bug Report
App crashes, with no error, in release variant on Android. The logcat shows this error:
To Reproduce
I have no idea where the error lies exactly. It is probably related to the rendering of an
Image
component.Expected Behavior
The app should not crash 🙂
Code Example
I cannot be sure because the error produced no stack trace for the JS part of the application, but I suppose the poblem might be start from this rendering:
Environment
The text was updated successfully, but these errors were encountered: