Fixed
Status Update
Comments
se...@google.com <se...@google.com> #2
Forgot to mention running platform-tools 26.0.0. And Android "O" public beta
yb...@google.com <yb...@google.com> #3
Not to be "that guy" but is there any update on this? Any additional information needed?
yb...@google.com <yb...@google.com> #4
Project: platform/system/core
Branch: master
commit f806a3c303028014eec43894386fbfb117667684
Author: Josh Gao <jmgao@google.com>
Date: Fri Aug 18 18:25:44 2017
fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.
Bug:http://b/64292422
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
M fastboot/usb_osx.cpp
https://android-review.googlesource.com/461857
https://goto.google.com/android-sha1/f806a3c303028014eec43894386fbfb117667684
Branch: master
commit f806a3c303028014eec43894386fbfb117667684
Author: Josh Gao <jmgao@google.com>
Date: Fri Aug 18 18:25:44 2017
fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.
Bug:
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
M fastboot/usb_osx.cpp
yb...@google.com <yb...@google.com> #5
Since OSX 10.13 is being released the 25th of September (in 5 days as of writing), is it possible to create a new Android Platform Tools release, so the impact can be as low as possible?
da...@gmail.com <da...@gmail.com> #6
Project: platform/system/core
Branch: sdk-release
commit 73f4670f380679ba5e6081968ba7ea992edf51b9
Author: Josh Gao <jmgao@google.com>
Date: Fri Aug 18 18:25:44 2017
fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.
Bug:http://b/64292422
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
(cherry picked from commit f806a3c303028014eec43894386fbfb117667684)
M fastboot/usb_osx.cpp
https://android-review.googlesource.com/489920
https://goto.google.com/android-sha1/73f4670f380679ba5e6081968ba7ea992edf51b9
Branch: sdk-release
commit 73f4670f380679ba5e6081968ba7ea992edf51b9
Author: Josh Gao <jmgao@google.com>
Date: Fri Aug 18 18:25:44 2017
fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.
Bug:
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
(cherry picked from commit f806a3c303028014eec43894386fbfb117667684)
M fastboot/usb_osx.cpp
yb...@google.com <yb...@google.com> #7
Thanks for the reminder, I'm kicking off the process now.
ap...@google.com <ap...@google.com> #8
Release process is still churning along, until then I've attached the binary we're planning to release that should work on 10.13.
Description
Version used: 2.2.0-alpha01
Devices/Android versions reproduced on: Android 9
I'm having some random crashes due to CoroutineLiveData
```
Fatal Exception: java.lang.IllegalArgumentException: This source was already added with the different observer
at androidx.lifecycle.MediatorLiveData.addSource + 89(MediatorLiveData.java:89)
at androidx.lifecycle.CoroutineLiveDataKt.addDisposableSource + 102(CoroutineLiveDataKt.java:102)
at androidx.lifecycle.CoroutineLiveData.emitSource$lifecycle_livedata_ktx_release + 200(CoroutineLiveData.java:200)
at androidx.lifecycle.LiveDataScopeImpl$emitSource$2.invokeSuspend + 89(LiveDataScopeImpl.java:89)
at androidx.lifecycle.LiveDataScopeImpl$emitSource$2.invoke(LiveDataScopeImpl.java:11)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn + 91(UndispatchedKt.java:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext + 156(BuildersKt__Builders_commonKt.java:156)
at kotlinx.coroutines.BuildersKt.withContext + 1(BuildersKt.java:1)
at androidx.lifecycle.LiveDataScopeImpl.emitSource + 88(LiveDataScopeImpl.java:88)
at com.geekorum.ttrss.articles_list.FeedsViewModel$refreshed$1.invokeSuspend + 90(FeedsViewModel.java:90)
at com.geekorum.ttrss.articles_list.FeedsViewModel$refreshed$1.invoke(FeedsViewModel.java:8)
at androidx.lifecycle.BlockRunner$maybeRun$1.invokeSuspend + 147(BlockRunner.java:147)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith + 33(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run + 241(DispatchedTask.java:241)
at android.os.Handler.handleCallback + 873(Handler.java:873)
at android.os.Handler.dispatchMessage + 99(Handler.java:99)
at android.os.Looper.loop + 193(Looper.java:193)
at android.app.ActivityThread.main + 6898(ActivityThread.java:6898)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 537(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main + 858(ZygoteInit.java:858)
```
From what I understand of CoroutineLiveData source code, when calling `LiveDataScope.emitSource()` the previous source is removed before adding the new one on MediatorLiveData.
```
@MainThread
internal fun emitSource(source: LiveData<T>): DisposableHandle {
clearSource()
val newSource = addDisposableSource(source)
emittedSource = newSource
return newSource
}
```
However the removing is done by launching a new coroutine
```
internal fun <T> MediatorLiveData<T>.addDisposableSource(
source: LiveData<T>
): DisposableHandle {
val disposed = AtomicBoolean(false)
addSource(source) {
if (!disposed.get()) {
value = it
} else {
removeSource(source)
}
}
return object : DisposableHandle {
override fun dispose() {
if (disposed.compareAndSet(false, true)) {
CoroutineScope(Dispatchers.Main).launch {
removeSource(source)
}
}
}
}
}
```
So there is no guarantee that `MediatorLiveData.addSource()` will be called after the removing coroutine is executed. This leads to the IllegalArgumentException in `MediatorLiveData.addSource()`
```
@MainThread
public <S> void addSource(@NonNull LiveData<S> source, @NonNull Observer<? super S> onChanged) {
Source<S> e = new Source<>(source, onChanged);
Source<?> existing = mSources.putIfAbsent(source, e);
if (existing != null && existing.mObserver != onChanged) {
throw new IllegalArgumentException(
"This source was already added with the different observer");
}
if (existing != null) {
return;
}
if (hasActiveObservers()) {
e.plug();
}
}
```