[Tablet Support M2] Crash when switching from one store to the next #10901
Closed
Description
opened on Feb 23, 2024
Describe the bug
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action.
Process: com.woocommerce.android.dev, PID: 18085
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at com.woocommerce.android.tools.ProductImageMap$get$2$2$1.invokeSuspend(ProductImageMap.kt:100)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@7f67dde, Dispatchers.IO]
To Reproduce
Steps to reproduce the behavior:
- Switch from one store to the next.
- Click on the orders tab.
- Observe the crash.
- See error
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
The app should not crash when this switch is being done.
Isolating the problem (mark completed items with an [x]):
- I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
- This bug happens with a default WordPress theme active, or Storefront.
- I can reproduce this bug consistently using the steps above.
Mobile Environment
Please include:
- Device: Nexus 10
- Android version: Android 13
- WooCommerce Android version: M2 Tablet Support
WordPress Environment
```
Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.
```
Activity