rozPierog / Cofi

Free and open-source coffee brew timer. Customizable time settings and an easy-to-use interface. Perfect cup every time.

Home Page:https://rozpierog.github.io/Cofi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash while editing recipe. Cofi 1.21.1

Genteure opened this issue · comments

Describe the bug
The app crashes when trying to edit a custom recipe.

To Reproduce

  1. Create a new recipe with no descriptions and 8 steps. (You might need more and less steps depending on screen height.)
  2. Tap on the recipe.
  3. Tap the pen edit icon on the top right.
  4. Tap any "Add water" or "Add coffee" step.
  5. The app crashes.

Expected behavior
Should not crash.

Screenshots
N/A

Smartphone:

  • Device: Redmi K60 (screen: 3200*1440 pixel)
  • Android: 14
  • App Version: 1.21.1 from F-Droid

Additional context

I have tested this problem did not exist on older version by exporting all recipes, uninstall Cofi, install Cofi 1.20.1 via F-Droid and import recipes.

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
	at B.t.h(SourceFile:5)
	at androidx.compose.foundation.lazy.layout.LazyLayoutItemAnimator.p(SourceFile:34)
	at androidx.compose.foundation.lazy.layout.LazyLayoutItemAnimator.m(SourceFile:1261)
	at B.r.e(SourceFile:62)
	at B.p$b.a(SourceFile:541)
	at B.p$b.l(SourceFile:9)
	at D.x$a$b.a(SourceFile:14)
	at D.x$a$b.l(SourceFile:9)
	at G0.A$d.g(SourceFile:113)
	at I0.x.t(SourceFile:73)
	at androidx.compose.ui.graphics.e.b(SourceFile:1)
	at I0.D.t(SourceFile:45)
	at A.z.b(SourceFile:49)
	at I0.c.b(SourceFile:10)
	at I0.D.t(SourceFile:45)
	at androidx.compose.foundation.layout.i.b(SourceFile:99)
	at I0.D.t(SourceFile:45)
	at I0.M$d.a(SourceFile:13)
	at I0.M$d.d(SourceFile:1)
	at h0.k$a.h(SourceFile:130)
	at h0.v$a.h(SourceFile:46)
	at h0.v.n(SourceFile:100)
	at I0.m0.h(SourceFile:3)
	at I0.m0.f(SourceFile:17)
	at I0.M.U(SourceFile:40)
	at I0.M.h(SourceFile:1)
	at I0.M$b.Y1(SourceFile:147)
	at I0.H.h1(SourceFile:20)
	at I0.H.i1(SourceFile:11)
	at I0.T.f(SourceFile:10)
	at I0.T.x(SourceFile:106)
	at I0.T.w(SourceFile:16)
	at I0.T.j(SourceFile:67)
	at I0.T.j(SourceFile:76)
	at I0.T.j(SourceFile:76)
	at I0.T.j(SourceFile:76)
	at I0.T.j(SourceFile:76)
	at I0.T.i(SourceFile:32)
	at androidx.compose.ui.platform.t.v(SourceFile:3)
	at I0.k0.h(SourceFile:8)
	at I0.M$b.Y1(SourceFile:105)
	at I0.H.h1(SourceFile:20)
	at I0.T.f(SourceFile:4)
	at I0.T.A(SourceFile:25)
	at I0.T.t(SourceFile:84)
	at androidx.compose.ui.platform.t.onMeasure(SourceFile:105)
	at android.view.View.measure(View.java:27980)
	at androidx.compose.ui.platform.a.i(SourceFile:64)
	at androidx.compose.ui.platform.a.onMeasure(SourceFile:4)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at androidx.appcompat.widget.ContentFrameLayout.onMeasure(SourceFile:155)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7083)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7083)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7083)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at com.android.internal.policy.DecorView.onMeasure(DecorView.java:826)
	at android.view.View.measure(View.java:27980)
	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4717)
	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:3235)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3591)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2933)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10224)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1626)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1635)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1170)
	at android.view.Choreographer.doFrame(Choreographer.java:1074)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1599)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:224)
	at android.os.Looper.loop(Looper.java:318)
	at android.app.ActivityThread.main(ActivityThread.java:8759)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

I get the same bug on Samsung A41. Doesn't need to be a custom recipe. The crash was reproduced by editing the Aeropress recipe and pressing on the first wait entry.

Sorry about that. It seems like there is an issue with animating content in lists in the newest Compose releases. I'll try to ship an update with workaround/fix asap