Status Update
Comments
rp...@google.com <rp...@google.com> #2
Process: work, PID: 7773
java.util.ConcurrentModificationException
at
androidx.compose.runtime.snapshots.StateListIterator.validateModification(SnapshotStateList.kt:297)
at androidx.compose.runtime.snapshots.StateListIterator.next(SnapshotStateList.kt:276)
at
.DashboardViewModel$getCarousalListApi$1$1$1.invokeSuspend(DashboardViewModel.kt:751)
at
.DashboardViewModel$getCarousalListApi$1$1$1.invoke(Unknown
Source:8)
at
.DashboardViewModel$getCarousalListApi$1$1$1.invoke(Unknown
Source:2)
at
.config.common.ExtensionsKt$launchOnIOWithCompletion$1.invokeSuspend(Extensions.kt:28)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@5443283, Dispatchers.IO]
vs...@google.com <vs...@google.com>
xa...@google.com <xa...@google.com> #3
reverse()
constructs two iterators (if the list is > 18 in size), one forward walking and one backwards walking and will modify the array using both iterators. This is currently treated as a concurrent modification as the array was modified after the iterator was created. This is too strict for the Java algorithms. They expect a concurrent modification exception to only be thrown if a structural chagne to the list is made, e.g. an insert or delete, not a value change.
First, mutableStateListOf()
lists will be changed to not interpret setting the value of the slot of an element as a concurrent. Second, they will be changed to support RandomAccess
which avoids the algorithms using the iterators for operations that would be faster if they used get
and set
directly.
vs...@google.com <vs...@google.com> #4
Branch: androidx-main
commit 75f720e1695c3574930d0385211341fac876a834
Author: Chuck Jazdzewski <chuckj@google.com>
Date: Thu Sep 14 15:22:33 2023
Relax concurrent modification exception for snapshot state list
The snapshot state list iterator considered any change made outside the
iterator as a concurrent change. This change relaxes the checking to
only consider structural changes (adding and removing) to be treated as
a concurrent change. This allows SnapshotStateList to be used with
`reverse()` which assumes that setting the value of an element is not a
concurrent change.
Adds RandomeAccess interface to MutableStateList to signal collection
extensions functions they can use direct indexing versions of their
algorithm.
Corrects the set() after a call previous() to update the correct
element.
Fixes: 219554654
Test: ./gradlew :compose:r:r:tDUT
Relnote: """SnapshotStateList is not marked as RandomAccess to enable
the direct indexing version of list helpers to be used"
Change-Id: I5210ca5c0f490619381ecf93ac0b1ccb03071e36
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/snapshots/SnapshotStateList.kt
M compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/snapshots/SnapshotStateListTests.kt
er...@gmail.com <er...@gmail.com> #5
vs...@google.com <vs...@google.com> #6
We often share logcat output in bugreports and such. This is noise we can do without.
Just want to confirm: you are copying logcat output from the logcat pane in Studio in your bugreports? (These aren't added to the real adb logcat
output, they are only shown inside Studio, so they won't be in any automated bug report systems)
er...@hellsoft.se <er...@hellsoft.se> #7
This is a common practice at several teams I worked in, so it's not unique to my current workplace.
vs...@google.com <vs...@google.com> #8
Sounds good. Adding a setting is tracked in
sh...@google.com <sh...@google.com>
sh...@google.com <sh...@google.com> #9
an...@google.com <an...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 1
- Android Gradle Plugin 8.8.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
####################################################
Please provide all of the following information, otherwise we may not be able to route your bug report.
####################################################
1. Describe the bug or issue that you're seeing.
When a fatal crash occurs, the logcat output includes the text "(Ask Gemini)" next to the first line of the exception. This should probably be a link or contain other information. One of my developers asked who Gemini was. :)
2. Attach log files from Android Studio
2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option.
2B. Create a diagnostic report and save it to your local computer.
2C. Attach the report to this bug using the Add attachments button.
3. If you know what they are, write the steps to reproduce:
3A. Login to your Google account
3B. Enable Gemini integration
3C. Open logcat and run an app that has a Fatal Exception
Build: AI-241.18034.62.2411.12169540, 202408010925
AS: Koala | 2024.1.1 Patch 2
AI-241.18034.62.2411.12169540, JRE 17.0.11+0-17.0.11b1207.24-11852314x64 JetBrains s.r.o., OS Mac OS X(aarch64) v14.6.1, screens 3024.0x1964.0
Android Gradle Plugin: 8.5.2
Gradle: 8.7
Gradle JDK: JetBrains Runtime 17.0.11 - aarch64
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: 3.29.2
```