ReadYouApp / ReadYouApp/ReadYou

`material3.LoadingIndicator` cause OOM

Open
#1,309 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug untriaged
Dominant language
Kotlin
Stars
7.5k
Forks
330
PR merge metrics
No merged PRs in 30d

Description

Checklist
  • I've already searched in existing issues and haven't found a similar problem reported.
  • I'm using the latest version of the app
  • This error caused the app to crash
  • This error is reproducible
Which category best fits this error?

User Interface

App version

0.16.2

Reproduction steps
  1. Open app.
  2. wait the source load.
Crash report
Version: 0.16.2
Device: realme RMX6688
System: Android 16 (API 36)

Stack trace: 

.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 3948960 free bytes and 3856KB until OOM, target footprint 402653184, growth limit 402653184; giving up on allocation because <1% of heap free after GC.
	at androidx.graphics.shapes.Morph.asCubics(Morph.kt:61)
	at androidx.compose.material3.internal.ShapeUtilKt.toPath$default(ShapeUtil.kt:1)
	at androidx.compose.material3.LoadingIndicatorKt$$ExternalSyntheticLambda2.invoke(R8$$SyntheticClass:89)
	at androidx.compose.ui.draw.DrawWithContentModifier.draw(DrawModifier.kt:3)
	at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui(LayoutNodeDrawScope.kt:50)
	at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:48)
	at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:28)
	at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:6)
	at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:8)
	at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:28)
	at androidx.compose.ui.node.LayoutNode.draw$ui(LayoutNode.kt:5)
	at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:28)
	at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:195)
	at androidx.compose.foundation.BackgroundNode.draw(Background.kt:125)
	at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui(LayoutNodeDrawScope.kt:50)
	at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:48)
	at androidx.compose.ui.node.NodeCoordinator$drawBlock$drawBlockCallToDrawModifiers$1.invoke(NodeCoordinator.kt:10)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:314)
	at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:35)
	at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke(GraphicsLayerOwnerLayer.android.kt:23)
	at androidx.compose.ui.graphics.layer.GraphicsLayer.drawWithChildTracking(AndroidGraphicsLayer.android.kt:38)
	at androidx.compose.ui.graphics.layer.GraphicsLayer$clipDrawBlock$1.invoke(AndroidGraphicsLayer.android.kt:49)
	at androidx.compose.ui.graphics.layer.GraphicsLayerV29.record(GraphicsLayerV29.android.kt:35)
	at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY(AndroidGraphicsLayer.android.kt:55)
	at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList(GraphicsLayerOwnerLayer.android.kt:99)
	at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:67)
	at android.view.View.draw(View.java:25756)
	at android.view.View.updateDisplayListIfDirty(View.java:24522)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4681)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4654)
	at android.view.View.updateDisplayListIfDirty(View.java:24447)
	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:726)
	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:732)
	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:861)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:6772)
	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:6382)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:5211)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3609)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:12077)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1877)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1886)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1398)
	at android.view.Choreographer.doFrame(Choreographer.java:1251)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1860)
	at android.os.Handler.handleCallback(Handler.java:1001)
	at android.os.Handler.dispatchMessage(Handler.java:109)
	at android.os.Looper.loopOnce(Looper.java:306)
	at android.os.Looper.loop(Looper.java:416)
	at android.app.ActivityThread.main(ActivityThread.java:9999)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:613)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1074)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with the listed steps while loading a source on Android 16, then inspect the use of material3.LoadingIndicator. Trace the stack from LoadingIndicatorKt through ShapeUtilKt.toPath and Morph.asCubics; done means source loading no longer causes an OutOfMemoryError on the affected setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.