helpcrunch / android-sdk-demo

Public demo for HelpCrunch Android SDK
Apache License 2.0
9 stars 1 forks source link

RuntimeException: Canvas: trying to draw too large(192000000bytes) bitmap. #46

Open nostra13 opened 3 years ago

nostra13 commented 3 years ago

Crash from production. Happens after help-crunch is opened (~10 sec after "Open chat" is clicked).

Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(192000000bytes) bitmap.
       at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:280)
       at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:88)
       at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:548)
       at android.widget.ImageView.onDraw(ImageView.java:1434)
       at android.view.View.draw(View.java:21440)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.draw(View.java:21443)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4372)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4345)
       at android.view.View.updateDisplayListIfDirty(View.java:20277)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4372)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4345)
       at android.view.View.updateDisplayListIfDirty(View.java:20277)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4372)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4345)
       at android.view.View.updateDisplayListIfDirty(View.java:20277)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4372)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4345)
       at android.view.View.updateDisplayListIfDirty(View.java:20277)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.draw(View.java:21443)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.draw(View.java:21443)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.draw(View.java:21443)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at androidx.fragment.app.FragmentContainerView.drawChild(FragmentContainerView.java:268)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at androidx.fragment.app.FragmentContainerView.dispatchDraw(FragmentContainerView.java:256)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.updateDisplayListIfDirty(View.java:20308)
       at android.view.View.draw(View.java:21172)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4388)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149)
       at android.view.View.draw(View.java:21443)
       at com.android.internal.policy.DecorView.draw(DecorView.java:806)
       at android.view.View.updateDisplayListIfDirty(View.java:20317)
       at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:575)
       at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:581)
       at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:654)
       at android.view.ViewRootImpl.draw(ViewRootImpl.java:3611)
       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3419)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2756)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1722)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7605)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
       at android.view.Choreographer.doCallbacks(Choreographer.java:852)
       at android.view.Choreographer.doFrame(Choreographer.java:787)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1014)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7397)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

implementation "com.helpcrunch:chat-sdk:3.1.3"

Device: Nokia 7.2 Android: 10

TalbotGooday commented 3 years ago

Thanks for the reporting again! How did the user manage to upload such a large image? :thinking:

nostra13 commented 3 years ago

I have no idea.

TalbotGooday commented 3 years ago

It was predictable :D