Fixed
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
la...@team.bumble.com <la...@team.bumble.com> #3
yea i'll take it.
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.
ju...@google.com <ju...@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()
}
}
la...@team.bumble.com <la...@team.bumble.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: Macrobenchmark, profileinstaller
Version used: 1.2.0-alpha07 (Macrobenchmark), 1.3.0-alpha02 (profileinstaller)
Devices/Android versions reproduced on: Samsung SM-A415F/SM-A217F (API 30) [not-rooted]
Hi!
I'm trying to update to macrobenchmark 1.2.0-alpha06 to 1.2.0-alpha07, and unfortunately due to the latest change relating to the dropShaderCache (or perhaps 'safe shell commands' -https://android-review.googlesource.com/c/platform/frameworks/support/+/2267992 ) macrobenchmark is failing on the first iteration of the test run.
Any tips to avoid this crash? Or is it possibly a bug with the latest version?