tasks icon indicating copy to clipboard operation
tasks copied to clipboard

Crash when adding a new location

Open onlycparra opened this issue 1 year ago • 6 comments

What happened:

  • I customized the name and icon of two already saved places using the house icon, and the pair-of-rectangular-buildings icon (which seems to show up duplicated in the list).
  • I try to add a third place, and upon tapping the "+" button, the app crashes.

The error log:

type: crash
osVersion: google/raven/raven:14/AP2A.240905.003.F1/2024090400:user/release-keys
package: org.tasks:131106
process: org.tasks
processUptime: 4201 + 228 ms
installer: com.android.packageinstaller

java.lang.IllegalArgumentException: No enum constant org.tasks.icons.OutlinedGoogleMaterial2.Icon.gmo_business
	at java.lang.Enum.valueOf(Enum.java:300)
	at org.tasks.icons.OutlinedGoogleMaterial2$Icon.valueOf(Unknown Source:2)
	at org.tasks.icons.OutlinedGoogleMaterial2.getIcon(OutlinedGoogleMaterial2.kt:62)
	at org.tasks.icons.OutlinedGoogleMaterial.getIcon(OutlinedGoogleMaterial.kt:65)
	at org.tasks.location.LocationPickerAdapter$PlaceViewHolder.bind(LocationPickerAdapter.java:114)
	at org.tasks.location.LocationPickerAdapter.onBindViewHolder(LocationPickerAdapter.java:70)
	at org.tasks.location.LocationPickerAdapter.onBindViewHolder(LocationPickerAdapter.java:31)
	at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7747)
	at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7847)
	at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6646)
	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6917)
	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6757)
	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6753)
	at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
	at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
	at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
	at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:687)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4645)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4348)
	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4919)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:149)
	at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
	at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2365)
	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:807)
	at android.view.View.layout(View.java:25159)
	at android.view.ViewGroup.layout(ViewGroup.java:6460)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4562)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3830)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2718)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9937)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
	at android.view.Choreographer.doFrame(Choreographer.java:945)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8623)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)

Other observations

Changing the icon to the "other" pair-of-rectangular-buildings makes the app NOT to crash uppon attempting to add a new location.

It seems to me that one of the duplicated icons is generating the problem.

onlycparra avatar Sep 11 '24 06:09 onlycparra

The app crashes for me when I try to add a location to a task. As soon as I tap "Location" the app crashes

MajorQuake18 avatar Sep 15 '24 20:09 MajorQuake18

I'm experiencing the same issue (on a Pixel 9 with Android 14).

McBaumwolle avatar Sep 18 '24 18:09 McBaumwolle

I'm on Pixel 8 with Android 15 beta

MajorQuake18 avatar Sep 21 '24 19:09 MajorQuake18

Same issue, Pixel 7 + EvoX 9.3.

jamie6king avatar Sep 24 '24 13:09 jamie6king

Sorry for the late response! I was out of town for a few weeks

This is probably a duplicate of #2990 - if so there is a workaround in that thread

abaker avatar Sep 27 '24 18:09 abaker

It's not just the office building - it's also the shopping cart (see Premier below). Whenever I set a place to that, it crashes.

Screenshot_20240928-084516_Tasks_1

jamie6king avatar Sep 28 '24 07:09 jamie6king

The shopping cart one should be fixed by https://github.com/tasks/tasks/commit/8ac6147302c7c07374dc8815ea3275e69ded5b20

There seem to be some mismatches between the material icons published to fonts.google.com and the material icon library for compose 🫤

abaker avatar Jan 06 '25 21:01 abaker