skydoves / android-developer-roadmap

🗺 The Android Developer Roadmap offers comprehensive learning paths to help you understand Android ecosystems.
Apache License 2.0
7.36k stars 679 forks source link

App crash on open #4

Closed yogeshpaliyal closed 2 years ago

yogeshpaliyal commented 2 years ago

Application installed successfully, but crash on open

Device : Redmi note 10 pro Android Version : 12 ROM : Pixel Extended

skydoves commented 2 years ago

Hey @yogeshpaliyal, Hmm, the demo project works on my devices, could you please build this demo on your device and capture the exceptions? Thanks!

yogeshpaliyal commented 2 years ago

Yes, sure. Can you assign this to me so I can also fix that

yogeshpaliyal commented 2 years ago

Thabks @skydoves

skydoves commented 2 years ago

No problem! :)

MohamedHarmoush commented 2 years ago

@skydoves Exception happened:

2021-12-02 15:11:03.558 18715-18715/io.getstream.androiddeveloperroadmap E/AndroidRuntime: FATAL EXCEPTION: main Process: io.getstream.androiddeveloperroadmap, PID: 18715 java.lang.RuntimeException: Canvas: trying to draw too large(131473540bytes) bitmap. at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97) at androidx.compose.ui.graphics.AndroidCanvas.drawImageRect-HPBpro0(AndroidCanvas.android.kt:275) at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.drawImage-AZ2fEMs(CanvasDrawScope.kt:253) at androidx.compose.ui.node.LayoutNodeDrawScope.drawImage-AZ2fEMs(Unknown Source:39) at androidx.compose.ui.graphics.drawscope.DrawScope$DefaultImpls.drawImage-AZ2fEMs$default(DrawScope.kt:508) at androidx.compose.ui.graphics.painter.BitmapPainter.onDraw(BitmapPainter.kt:93) at androidx.compose.ui.graphics.painter.Painter.draw-x_KDEd0(Painter.kt:212) at androidx.compose.ui.draw.PainterModifier.draw(PainterModifier.kt:289) at androidx.compose.ui.node.ModifiedDrawNode.performDraw(ModifiedDrawNode.kt:100) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:255) at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:98) at androidx.compose.ui.node.LayoutNodeWrapper$invoke$1.invoke(LayoutNodeWrapper.kt:269) at androidx.compose.ui.node.LayoutNodeWrapper$invoke$1.invoke(LayoutNodeWrapper.kt:268) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88) at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:268) at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:59) at androidx.compose.ui.platform.RenderNodeApi23.record(RenderNodeApi23.android.kt:217) at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:292) at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:234) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:250) at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:98) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:255) at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:98) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:255) at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:854) at androidx.compose.ui.node.InnerPlaceable.performDraw(InnerPlaceable.kt:136) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:255) at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:98) at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:255) at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:854) at androidx.compose.ui.node.InnerPlaceable.performDraw(InnerPlaceable.kt:136) at androidx.compose.ui.node.LayoutNodeWrapper$invoke$1.invoke(LayoutNodeWrapper.kt:269) at androidx.compose.ui.node.LayoutNodeWrapper$invoke$1.invoke(LayoutNodeWrapper.kt:268) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1798) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:88) at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:268) at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:59) at androidx.compose.ui.platform.RenderNodeApi23.record(RenderNodeApi23.android.kt:217) at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:292) at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:847) at android.view.View.draw(View.java:19317) at android.view.View.updateDisplayListIfDirty(View.java:18250) 2021-12-02 15:11:03.565 18715-18715/io.getstream.androiddeveloperroadmap E/AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4252) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4232) at android.view.View.updateDisplayListIfDirty(View.java:18209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4252) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4232) at android.view.View.updateDisplayListIfDirty(View.java:18209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4252) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4232) at android.view.View.updateDisplayListIfDirty(View.java:18209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4252) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4232) at android.view.View.updateDisplayListIfDirty(View.java:18209) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:684) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:690) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:804) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3206) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3004) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2533) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1522) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7292) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981) at android.view.Choreographer.doCallbacks(Choreographer.java:790) at android.view.Choreographer.doFrame(Choreographer.java:721) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967) at android.os.Handler.handleCallback(Handler.java:808) at android.os.Handler.dispatchMessage(Handler.java:101) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7529) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

MahmoudMabrok commented 2 years ago

I think device has low memory image is too large on his storage.

skydoves commented 2 years ago

Resolved - Fix Crash for low end devices #8