Skip to content

Thread safety #397

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

Open
orange4glace opened this issue Apr 11, 2025 · 3 comments
Open

Thread safety #397

orange4glace opened this issue Apr 11, 2025 · 3 comments
Labels
bug Something isn't working high priority

Comments

@orange4glace
Copy link
Contributor

orange4glace commented Apr 11, 2025

Feature Request

I think RNAPI needs to be more thread safe, for example,
Things like AudioParam.eventsQueue_ can be accessed on both JS thread and Audio thread,
so changing param value while playing audio might cause crash.
(Correct me if I'm wrong)

@maciejmakowski2003
Copy link
Collaborator

I will investigate it

@maciejmakowski2003
Copy link
Collaborator

Thanks for your vigilance!

@maciejmakowski2003 maciejmakowski2003 self-assigned this Apr 14, 2025
@linear linear bot added the bug Something isn't working label Apr 24, 2025
@AlirezaHadjar
Copy link

AlirezaHadjar commented May 10, 2025

@maciejmakowski2003 I'm not sure but this could the reason our app crash in the release mode. I ported over our api from expo-av to react-native-audio-api and everything works seemlessly in the debug app but when I test it on the release app, it insta crashes as soon as I call AudioContext.decodeAudioDataSource(file). I tried to replicate the issue in a fresh project but it worked fine there. I really appreciate any help here

Image

And here is the sentry log of the crash

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority
Projects
None yet
Development

No branches or pull requests

3 participants