-
Notifications
You must be signed in to change notification settings - Fork 563
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
Possible crash on disconnect with streams using Oboe sample rate conversion #2035
Comments
This is related to: Internally tracked in: |
philburk
added a commit
that referenced
this issue
Jun 12, 2024
This is used when Oboe does sample rate conversion. Or format or channel count conversion. It used to use a raw pointer, which could cause crashes. Fixes #2035
philburk
added a commit
that referenced
this issue
Jun 12, 2024
This is used when Oboe does sample rate conversion. Or format or channel count conversion. It used to use a raw pointer, which could cause crashes. Fixes #2035
philburk
added a commit
that referenced
this issue
Jun 12, 2024
This is used when Oboe does sample rate conversion. Or format or channel count conversion. It used to use a raw pointer, which could cause crashes. Fixes #2035
philburk
added a commit
that referenced
this issue
Jun 13, 2024
to reflect the fix to #2035 for the shared_ptr when using Oboe SRC
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a stream was opened using setSampleRate() and the setSampleRateConversionQuality() was not None,
then if a headset was plugged in or unplugged,
and another thread or the user closed the stream,
then it was possible to get a crash in oboe_aaudio_error_thread_proc().
Note that this bug could also occur if any of these other conversion functions were enabled:
To avoid this bug, use Oboe v1.9.0 or later.
Note that the bug was due to not using shared_ptr when calling builder->openStream().
Because it is so dangerous, we are disabling the openStream(AudioStream **streamPP)
method. It was deprecated a long time ago. Now if you call it you will get an error and no stream.
The root cause was because the AudioStreamBuilder.openStream() was not using a shared_ptr
when creating a child stream. buggy code
Using a shared_ptr is necessary to prevent an error callback from using a raw pointer and referencing a deleted stream.
It also prevents the stream from being deleted while a data callback is active.
The text was updated successfully, but these errors were encountered: