-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
NPE in pollQueue #1354
Comments
Hi. I can't see anything obviously wrong with the ObserveOn; it appears either vs is null or the vs.array is null, which both should be impossible since vs is never set to null and vs.array should contain an object array with at least a single value because the pollQueue is executed only after it has gained its first item. So either the AtomicLongFieldUpdater on Android doesn't behave correctly or JIT compilation generates incorrect code or memory fences. |
@akarnokd : what if If Murphy's law kicks in and one of the |
(I'm not sure this can happen though, as |
You're right. The queue is of length 2 and the counter is decremented to -1 by pollQueue and then incremented to 0 by onNext without scheduling another pollQueue. Due to -1 and the == after addAndGet, it doesn't quit and now reads a FastList with null array. Changing the == 0 to > 0 should fix the problem. I can't do a PR until Monday. |
I can do one in order to get some reviews (and I think you mean Edit: putting it in the |
Since using 0.19 I see some sporadic NPEs where the complete stack trace contains only rx methods. Therefore I cannot really say what conditions in our code trigger that NPE.
The text was updated successfully, but these errors were encountered: