Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
I created a thread on the android-developers forum related to this bug:
http://groups.google.com/group/android-
developers/browse_thread/thread/6caa57135927e242/86d4d895e88a5ebb?
lnk=gst&q=custom+account#86d4d895e88a5ebb
developers/browse_thread/thread/6caa57135927e242/86d4d895e88a5ebb?
lnk=gst&q=custom+account#86d4d895e88a5ebb
[Deleted User] <[Deleted User]> #3
My personal theory is that Google broke this part of the API intentionally to keep
the lock-in on sync functionality they've enjoyed since Android 1.0.....
the lock-in on sync functionality they've enjoyed since Android 1.0.....
ap...@google.com <ap...@google.com> #5
[Comment deleted]
Description
Version used: 2.1.0-alpha06
Devices/Android versions reproduced on: Doesn't matter
Using a Single in a Dao makes Room generate a Single.fromCallable. The docs in Single.fromCallable say:
If the {@link Callable} throws an exception, the respective {@link Throwable} is
delivered to the downstream via {@link SingleObserver#onError(Throwable)},
except when the downstream has disposed this {@code Single} source.
In this latter case, the {@code Throwable} is delivered to the global error handler via
{@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}.
If we subscribe to a Single and dispose before it delivers the EmptyResultSetException, will cause the exception to be sent to the global error handler, which means it will crash.
I think this could be avoided by using Single.create and checking if the emitter still has observers before trying to emit the error.
Can't provide a sample because this is a timing issue.