Skip to content
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

1.x: NullPointerException in OperatorSwitch #4004

Closed
artem-zinnatullin opened this issue Jun 13, 2016 · 3 comments
Closed

1.x: NullPointerException in OperatorSwitch #4004

artem-zinnatullin opened this issue Jun 13, 2016 · 3 comments
Labels

Comments

@artem-zinnatullin
Copy link
Contributor

Reported from app version with RxJava 1.1.3, but OperatorSwitch was not changed since 1.1.3 so it still looks actual.

Caused by java.lang.NullPointerException
rx.internal.operators.OperatorSwitch$SwitchSubscriber.drain (OperatorSwitch.java:316)
rx.internal.operators.OperatorSwitch$SwitchSubscriber.childRequested (OperatorSwitch.java:266)
rx.internal.operators.OperatorSwitch$SwitchSubscriber$2.request (OperatorSwitch.java:124)
rx.Subscriber.request (Subscriber.java:157)
rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call (OperatorObserveOn.java:220)
rx.internal.schedulers.ScheduledAction.run (ScheduledAction.java:55)

On the line: if (localIndex.get() == inner.id) {

localIndex is final, so looks like inner is null.

// JFYI it was on Samsung with Android 6.0.1.

@akarnokd
Copy link
Member

This appears to be a bug with the JCTools queue. The fix is simply swap two operations in 3 places, but before I post the fix, I'll sort this out with JCTools.

@akarnokd akarnokd added the Bug label Jun 13, 2016
@akarnokd
Copy link
Member

Fix in #4005.

@akarnokd
Copy link
Member

Fix delivered in 1.1.6. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants