lincollincol / compose-audiowaveform

Audio waveform library for Jetpack Compose
Apache License 2.0
199 stars 12 forks source link

App crashing #6

Closed shahroz-wilder closed 1 year ago

shahroz-wilder commented 2 years ago

Hey there, a very weird thing is happening to me. If i run my app it works fine, the moment I generate an APK (debug & prod) the app starts crashing, not sure if there is a version conflict of compose or something

Fatal Exception: java.lang.NoSuchMethodError: No static method drawRoundRect-ZuiqVtQ$default(Landroidx/compose/ui/graphics/drawscope/DrawScope;Landroidx/compose/ui/graphics/Brush;JJJFLandroidx/compose/ui/graphics/drawscope/DrawStyle;Landroidx/compose/ui/graphics/ColorFilter;IILjava/lang/Object;)V in class Landroidx/compose/ui/graphics/drawscope/DrawScope; or its super classes (declaration of 'androidx.compose.ui.graphics.drawscope.DrawScope' appears in /data/app/~~T3hw3VsgkcCWIL9FcsmQJQ==/com.zero.android-64B_I5Q69FNpyFB7i7CAtA==/base.apk)
       at com.linc.audiowaveform.AudioWaveformKt$AudioWaveform$2.invoke(AudioWaveform.kt:100)
       at com.linc.audiowaveform.AudioWaveformKt$AudioWaveform$2.invoke(AudioWaveform.kt:74)
       at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:104)
       at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:376)
       at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
       at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
       at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2139)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:130)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:126)
       at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
       at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
       at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
       at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
       at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:180)
       at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:298)
       at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:239)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:64)
       at androidx.compose.foundation.Background.draw(Background.kt:107)
       at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:376)
       at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:64)
       at androidx.compose.material.ripple.AndroidRippleIndicationInstance.drawIndication(Ripple.android.kt:184)
       at androidx.compose.foundation.IndicationModifier.draw(Indication.kt:183)
       at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:376)
       at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
       at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
       at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
       at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
       at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
       at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
       at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
       at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2139)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:130)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:126)
       at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
       at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(:1)
       at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
       at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
       at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
       at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
       at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:180)
       at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:298)
       at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1010)
       at android.view.View.draw(View.java:22818)
       at android.view.View.updateDisplayListIfDirty(View.java:21669)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4588)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4561)
       at android.view.View.updateDisplayListIfDirty(View.java:21626)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4588)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4561)
       at android.view.View.updateDisplayListIfDirty(View.java:21626)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4588)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4561)
       at android.view.View.updateDisplayListIfDirty(View.java:21626)
       at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4588)
       at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4561)
       at android.view.View.updateDisplayListIfDirty(View.java:21626)
       at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:534)
       at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:540)
       at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:620)
       at android.view.ViewRootImpl.draw(ViewRootImpl.java:4763)
       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4467)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3549)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2322)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9155)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1232)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1029)
       at android.view.ChoreographerExtImpl.checkScrollOptSceneEnable(ChoreographerExtImpl.java:387)
       at android.view.Choreographer.doFrame(Choreographer.java:913)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1217)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:238)
       at android.os.Looper.loop(Looper.java:349)
       at android.app.ActivityThread.main(ActivityThread.java:8241)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
lincollincol commented 2 years ago

@shahroz-wilder Hello! Hmm, interesting crash. I have generated a signed build with R8 and everything works fine. Did you find a solution to this problem? Please check this answer on StackOverflow, maybe it will help you

yosuke65 commented 1 year ago

@lincollincol I'm facing the same issue. It's working in running app but in build apk it's causing the error.

lincollincol commented 1 year ago

More details in #9