Closed ivnsch closed 7 years ago
Please check your application for the use of Observable.unsafeCreate
or extends Observable
as possible candidates.
I haven't any of these... (I'm also 110% sure as I developed the app from scratch and don't even know how to use them. I did a text search anyway).
Maybe com.jakewharton.rxbinding2:rxbinding-kotlin:2.0.0
could be responsible? I see some of them there and it's the only dependency that could be causing this.
My guess is this line in the Rx binding. If you subscribe off the main thread, the error path doesn't properly initialize the stream and you get an NPE.
I think I'm doing all my UI operations using the main thread scheduler, but will review.
Anyway, how can I debug to confirm this (if possible not having to put breakpoints in rxbinding-kotlin
)? The exception you linked to is nowhere to be seen in the stacktrace...
Place a breakpoint on that method.
/cc @JakeWharton
heh, I just edited my last comment with "if possible not having to put breakpoints in rxbinding-kotlin
"... I'll do it... but am curious in general how to debug this kind of things. I mean, if you weren't helping me I wouldn't have an idea about where to put the breakpoint...
This is the trouble with omitting an onSubscribe
in a sequence that goes async. I'd modify one of the debug support implementation with protocol verification.
@akarnokd Ok, I got it, I forgot to use the main thread scheduler in a call, which at some point calls rx bindings. It's triggered in the line you linked to. I found this using the breakpoint - enabling debug support didn't have an apparent effect and the stacktrace was the same as before... probably I need to dive more into it to understand how to use it.
I've posted the issue on RxBinding. I'll also think about adding some additional debug support in RxJava2Extensions to help detecting such cases.
Thanks!
I get this exception sometimes. It can't be reproduced reliably. Can't find any reference to my code, so I have no idea what's causing it:
Any ideas...?