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

3.x: Fix ObservableSwitchMap NPE due to onSubscribe-cancel race #7597

Merged
merged 1 commit into from Aug 29, 2023

Conversation

akarnokd
Copy link
Member

If the dispose of the outer switchMap happens just before the inner onSubscribe is invoked, the queue is not set. Subsequently, if an operator signals onNext right after (such as scan), it will result in a NullPointerException.

The fix is to do a null check on the queue before offering.

Fixes #7596

@akarnokd akarnokd added this to the 3.1-support milestone Aug 29, 2023
@akarnokd akarnokd merged commit 542374c into ReactiveX:3.x Aug 29, 2023
3 checks passed
@akarnokd akarnokd deleted the SwitchMapRaceFix branch August 29, 2023 22:17
github-merge-queue bot pushed a commit to slackhq/circuit that referenced this pull request Sep 30, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io.reactivex.rxjava3:rxjava](https://togithub.com/ReactiveX/RxJava) |
dependencies | patch | `3.1.7` -> `3.1.8` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>ReactiveX/RxJava (io.reactivex.rxjava3:rxjava)</summary>

###
[`v3.1.8`](https://togithub.com/ReactiveX/RxJava/releases/tag/v3.1.8)


[Maven](http://search.maven.org/#artifactdetails%7Cio.reactivex.rxjava3%7Crxjava%7C3.1.8%7C)
[JavaDocs](http://reactivex.io/RxJava/3.x/javadoc/3.1.8)

##### Bugfixes

- Fix `ObservableSwitchMap` `NullPointerException` due to cancel race.
([ReactiveX/RxJava#7597)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4xLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->
nikclayton pushed a commit to pachli/pachli-android that referenced this pull request Nov 16, 2023
)

[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.reactivex.rxjava3:rxjava](https://togithub.com/ReactiveX/RxJava) |
`3.1.7` -> `3.1.8` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.reactivex.rxjava3:rxjava/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.reactivex.rxjava3:rxjava/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.reactivex.rxjava3:rxjava/3.1.7/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.reactivex.rxjava3:rxjava/3.1.7/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ReactiveX/RxJava (io.reactivex.rxjava3:rxjava)</summary>

###
[`v3.1.8`](https://togithub.com/ReactiveX/RxJava/releases/tag/v3.1.8)


[Maven](http://search.maven.org/#artifactdetails%7Cio.reactivex.rxjava3%7Crxjava%7C3.1.8%7C)
[JavaDocs](http://reactivex.io/RxJava/3.x/javadoc/3.1.8)

##### Bugfixes

- Fix `ObservableSwitchMap` `NullPointerException` due to cancel race.
([ReactiveX/RxJava#7597)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
slack-oss-bot added a commit to slackhq/slack-gradle-plugin that referenced this pull request Dec 5, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io.reactivex.rxjava3:rxjava](https://togithub.com/ReactiveX/RxJava) |
dependencies | patch | `3.1.7` -> `3.1.8` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>ReactiveX/RxJava (io.reactivex.rxjava3:rxjava)</summary>

###
[`v3.1.8`](https://togithub.com/ReactiveX/RxJava/releases/tag/v3.1.8)


[Maven](http://search.maven.org/#artifactdetails%7Cio.reactivex.rxjava3%7Crxjava%7C3.1.8%7C)
[JavaDocs](http://reactivex.io/RxJava/3.x/javadoc/3.1.8)

##### Bugfixes

- Fix `ObservableSwitchMap` `NullPointerException` due to cancel race.
([ReactiveX/RxJava#7597)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4wIiwidXBkYXRlZEluVmVyIjoiMzcuODEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
connyduck pushed a commit to tuskyapp/Tusky that referenced this pull request Jan 3, 2024
…4092)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.reactivex.rxjava3:rxjava](https://togithub.com/ReactiveX/RxJava) |
`3.1.6` -> `3.1.8` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.reactivex.rxjava3:rxjava/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.reactivex.rxjava3:rxjava/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.reactivex.rxjava3:rxjava/3.1.6/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.reactivex.rxjava3:rxjava/3.1.6/3.1.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ReactiveX/RxJava (io.reactivex.rxjava3:rxjava)</summary>

###
[`v3.1.8`](https://togithub.com/ReactiveX/RxJava/releases/tag/v3.1.8)


[Maven](http://search.maven.org/#artifactdetails%7Cio.reactivex.rxjava3%7Crxjava%7C3.1.8%7C)
[JavaDocs](http://reactivex.io/RxJava/3.x/javadoc/3.1.8)

##### Bugfixes

- Fix `ObservableSwitchMap` `NullPointerException` due to cancel race.
([ReactiveX/RxJava#7597)

###
[`v3.1.7`](https://togithub.com/ReactiveX/RxJava/releases/tag/v3.1.7)


[Maven](http://search.maven.org/#artifactdetails%7Cio.reactivex.rxjava3%7Crxjava%7C3.1.7%7C)
[JavaDocs](http://reactivex.io/RxJava/3.x/javadoc/3.1.7)

##### API changes

- Add `onDropped` callback for `onBackpressureLatest`. (<a
href='https://github.com/ReactiveX/RxJava/issues/7542'>[#&#8203;7542](https://togithub.com/ReactiveX/RxJava/issues/7542)</a>)
- Add `onDropped` callback to `onBackpressureBuffer`. (<a
href='https://github.com/ReactiveX/RxJava/issues/7567'>[#&#8203;7567](https://togithub.com/ReactiveX/RxJava/issues/7567)</a>)

##### Documentation

- Change summary to caption, because summary is obsolete in HTML5. (<a
href='https://github.com/ReactiveX/RxJava/issues/7534'>[#&#8203;7534](https://togithub.com/ReactiveX/RxJava/issues/7534)</a>)
- Try using https to access the reactive streams javadoc. (<a
href='https://github.com/ReactiveX/RxJava/issues/7535'>[#&#8203;7535](https://togithub.com/ReactiveX/RxJava/issues/7535)</a>)
-   Improve Javadoc of `Disposable`.

##### Other

- Add minimum GitHub token permissions for workflows. (<a
href='https://github.com/ReactiveX/RxJava/issues/7541'>[#&#8203;7541](https://togithub.com/ReactiveX/RxJava/issues/7541)</a>)
- Create SECURITY.md (<a
href='https://github.com/ReactiveX/RxJava/issues/7546'>[#&#8203;7546](https://togithub.com/ReactiveX/RxJava/issues/7546)</a>)
- Add copyright and license to jar. (<a
href='https://github.com/ReactiveX/RxJava/issues/7520'>[#&#8203;7520](https://togithub.com/ReactiveX/RxJava/issues/7520)</a>)
- Convert `CompletableOnErrorComplete$onError` inner class to static.
(<a
href='https://github.com/ReactiveX/RxJava/issues/7575'>[#&#8203;7575](https://togithub.com/ReactiveX/RxJava/issues/7575)</a>)
- Allow null accumulator type in the `collect(Collector)` operators. (<a
href='https://github.com/ReactiveX/RxJava/issues/7590'>[#&#8203;7590](https://togithub.com/ReactiveX/RxJava/issues/7590)</a>)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/tuskyapp/Tusky).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMTAzLjEiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.x: SwitchMapInnerObserver.queue.offer NullPointerException
2 participants