facebookresearch / playtorch

PlayTorch is a framework for rapidly creating mobile AI experiences.
https://playtorch.dev/
MIT License
829 stars 100 forks source link

Fix issue with JNI Env not available for audio #182

Closed raedle closed 1 year ago

raedle commented 1 year ago

Summary: The Hermes GC will eventually clean up orphan host objects. This is also the case for AudioHostObject, which itself has a reference to Audio that needs to be cleaned up, hence the call to the Audio::~Audio destructor. On Android, it will try to release the global_ref<JAudio> resource, which at the time, may not run in the JVM thread scope causing an app crash.

Differential Revision: D42060942

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Updated | | :--- | :----- | :------ | :------ | | **playtorch** | ⬜️ Ignored ([Inspect](https://vercel.com/fbopensource/playtorch/AWPNjt5qE1dzAbgeYnBKf3gKsoGz)) | | Dec 15, 2022 at 6:23AM (UTC) |
facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D42060942

facebook-github-bot commented 1 year ago

This pull request has been merged in facebookresearch/playtorch@c93ec9324141d7293e5f6c2d47db27bf32f9acee.