Verified
Status Update
Comments
cc...@google.com <cc...@google.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
cc...@google.com <cc...@google.com> #3
yea i'll take it.
cc...@google.com <cc...@google.com>
ap...@google.com <ap...@google.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
cc...@google.com <cc...@google.com> #5
just emitting same live data reproduces the issue.
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
pr...@google.com <pr...@google.com> #6
With 2.2.0-alpha04 (that use Main.immediate), the issue seems to be still there (I tested it by calling emitSource() twice, like your test case)
Description
Component used: androidx.baselineprofile, androidx.benchmark:benchmark-macro-junit4
Version used: 1.2.0-rc01
Devices/Android versions reproduced on: Pixel 7 Android 34 Emulator
Android Studio Iguana | 2023.2.1 Canary 6
Build #AI-232.9921.47.2321.10875067, built on September 28, 2023
Runtime version: 17.0.8+0-17.0.8b1000.22-10799086 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.5.2
There seems to be a regression between beta05 and rc01 of the baselineProfile plugin.
saveInSrc = true
works correctly in beta05, but doesn't pull the profile from device to the host and save it when using rc01.rc1 produces the following logcat which seems to output the end of the test twice, is this the issue?
Baseline Test is simple:
Also seeing a lot of time out warnings around the fling(Direction.Down) call. Can log another issue for that if needed.