Fixed
Status Update
Comments
mh...@google.com <mh...@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
ra...@google.com <ra...@google.com> #3
yea i'll take it.
cc...@google.com <cc...@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.
ap...@google.com <ap...@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()
}
}
na...@google.com <na...@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: not sure what this means but BaselineProfileRule from macrobenchmark library
Version used: latest nightly snapshot from androidx.dev (1.2.0-SNAPSHOT)
Devices/Android versions reproduced on: Android P on go/acid
The macrobenchmark library fails to get a profile when the apk under test is actually a bundle with multiple splits. We at chrome use bundles with multiple splits (actually most of our code lives in splits rather than in the base module). When I try to generate a profile I get this in the output of the instrumentation:
The cause of this is this line here expects only a single path to return but for bundles, you get multiple ones (one for each split). eg:
The rest of the code in BaselineProfiles.kt also expects only the one profile. But there are usually multiple (one for each split).
The documentation for baseline profiles mentions both APKs and Bundles so I assume bundles should be supported?