Skip to content

1.x: NullPointerException in OperatorSwitch #4004

Closed
@artem-zinnatullin

Description

@artem-zinnatullin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions