-
Notifications
You must be signed in to change notification settings - Fork 371
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
Null pointer de-reference / UB on Android #636
Comments
Unfortunately the issue is now occurring even when the app is in the Compiling with debug symbols enabled I can now see that the issue is inside of
I'll file an issue with them and link back to this one. |
Looks like the true source of the error was the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, cpal team! 👋🏻
When attempting to play Audio on Android (specifically, the Oculus Quest 2 running v37), I am encountering the following crash:
The specific line in the backtrace points to this section of my code:
Which I believe is calling this function in
oddio
:As there isn't any unsafe code in any of these functions, I believe the problem is somewhere inside of
cpal
.After digging further, I was able to determine the problem is
setup_audio
was called too early in the Android lifecycle. If the code is called only afterndk_glue::Event::Resume
is received, then the issue is resolved.I'm not familiar enough with
cpal
to dig into why the UB is being triggered, but as this was quite a tricky problem to track down and resolve, it may be worth investigating why UB was triggered incpal
's safe API.Please let me know if there's any further information I can provide!
The text was updated successfully, but these errors were encountered: