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

AUDIO_WORKLET + MODULARIZE broken in 3.1.59 #21908

Closed
kichikuou opened this issue May 8, 2024 · 2 comments · Fixed by #21958
Closed

AUDIO_WORKLET + MODULARIZE broken in 3.1.59 #21908

kichikuou opened this issue May 8, 2024 · 2 comments · Fixed by #21958
Assignees

Comments

@kichikuou
Copy link

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.59 (0e4c5994eb5b8defd38367a416d0703fd506ad81)
clang version 19.0.0git (https:/github.com/llvm/llvm-project df762a1643bb5b0b3c907611d118c82d4b68a39d)
Target: wasm32-unknown-emscripten
Thread model: posix

Failing command line in full:
Compile audioworklet.c in the Emscripten webaudio test directory:

cd emscripten/test/webaudio
emcc audioworklet.c -o audioworklet.html -sAUDIO_WORKLET -sWASM_WORKERS -sMODULARIZE -sEXPORT_ES6

And open audioworklet.html in the browser.

Error:

audioworklet.js:635 Aborted(Access to module property ('stackAlloc') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.)
audioworklet.js:654 Uncaught RuntimeError: Aborted(Access to module property ('stackAlloc') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.)
    at abort (audioworklet.js:654:11)
    at Object.get (audioworklet.js:1947:9)
    at new WasmAudioWorkletProcessor (audioworklet.aw.js:24:37)

It looks like a regression by #21775.

@sbc100
Copy link
Collaborator

sbc100 commented May 16, 2024

Interesting. I wonder why the test we have that (browser.test_audio_worklet_es6) is not failing..

@sbc100
Copy link
Collaborator

sbc100 commented May 16, 2024

The reason we don't see this fail is because browser.test_audio_worklet_es6 doesn't keep the runtime alive long enough do anything with the audio worklet, it just exits when main returns. Also, we don't currently have any way to actually run audio tests during CI so even without this crash the test isn't actually playing any audio when run in CI. Instead we must rely mostly on interactive tests today to test audio stuff.

sbc100 added a commit to sbc100/emscripten that referenced this issue May 16, 2024
sbc100 added a commit to sbc100/emscripten that referenced this issue May 17, 2024
The change that was made back in emscripten-core#21775 means that its no longer OK to
ignore the return value of the `MODULARIZE` constructor function.

Fixes: emscripten-core#21908
sbc100 added a commit to sbc100/emscripten that referenced this issue May 17, 2024
The change that was made back in emscripten-core#21775 means that its no longer OK to
ignore the return value of the `MODULARIZE` constructor function.

Fixes: emscripten-core#21908
sbc100 added a commit to sbc100/emscripten that referenced this issue May 17, 2024
The change that was made back in emscripten-core#21775 means that its no longer OK to
ignore the return value of the `MODULARIZE` constructor function.

Fixes: emscripten-core#21908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants