-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxTextView.textChanges crashes when one of subscriptions produces an error #192
Comments
Interesting; this seems to be a concurrency issue in the Android listener itself. Having solved an almost identical problem to this recently, it's only really solvable if the emitter uses something like A simple workaround would be to share the |
(In case anyone is curious, here's the exact same problem in a slightly different context and the fix I settled on for now.) |
I believe you could also add .unsubscribeOn(mainThread()) which would delay On Thu, Nov 12, 2015 at 9:04 AM Daniel Lew [email protected] wrote:
|
Have spent several hours to locate that bug. The easiest example to reproduce (place it to
Workaround may be (as @dlew mentioned):
|
Has a bug been filed on b.android.com for this ever? I'm struggling to have any desire to fix this in the library. |
https://code.google.com/p/android/issues/detail?id=190399 is about that. Seems pretty dead. |
Great! I'll take care of it. On Fri, Jun 24, 2016, 1:40 AM Mikhail Demerzov [email protected]
|
Hi Jake and everyone! Thanks for excellent job!
When I use
RxTextView.textChanges
with several subscriptions and one of them produces an error (which I handle properly) the app crashes.Here is the simple code:
When I run my app and type something in my
EditText
the app crashes:And it happens because when user types something, the first subscription throws an Exception and then
TextView.removeTextChangedListener
is called inTextViewTextOnSubscribe.java:39
(because ofunsubscribe
after error). But theTextView
is still iterating over it's watchers in theTextView.sendOnTextChanged
method!The text was updated successfully, but these errors were encountered: