If you build with `-g` (or just `--profiling-funcs`) when you should see symbol names in your backtrace which might help you figure out what is going on. You might also want to drop the `-O3` when debugging too.
BTW, we have `emscripten_console_log` and `emscripten_console_error` functions so you shouldn't need to write EM_ASM blocks just to write to the console. On Tue, Jul 2, 2024 at 10:46 PM fidel espanto <fidel.espa...@gmail.com> wrote: > I'm trying to call an async function, 'isConfigSupported > <https://developer.mozilla.org/en-US/docs/Web/API/VideoDecoder/isConfigSupported_static>' > from WebCodecs API. > > Here is what I did in C++, > val VideoDecoder = val::global("VideoDecoder"); > ConfigCodec* config = new ConfigCodec(); // some struct > config->codec = "vp8"; > config->codedWidth = 640; > config->codedHeight = 480; > > val result = VideoDecoder.call<val>("isConfigSupported", config).await > (); > > if (result["supported"].as<bool>()) { > EM_ASM( > console.log("Codec is supported"); > ); > } else { > EM_ASM( > console.error("Codec is not supported"); > ); > } > > I have compiled emcc with this additional option, '-O3 -sASYNCIFY' as > stated in the documentation. > > The result is 'Codec is supported', however, I get an error in the console > logs, > wasmapi.wasm:0x1e79f Uncaught (in promise) RuntimeError: unreachable > at wasmapi.wasm:0x1e79f > at wasmapi.wasm:0x1ca34 > at wasmapi.wasm:0x118be > at ret.<computed> (wasmapi.js:1:87071) > at Object.doRewind (wasmapi.js:1:88672) > at wasmapi.js:1:89246 > > Did I miss something? What does this error mean? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to emscripten-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/667e2e81-38ff-4c2e-a930-8cb76e1cffebn%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/667e2e81-38ff-4c2e-a930-8cb76e1cffebn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAL_va285NacBu5PmxHb8%2B7f7rv8RB7f%3DOMvkOuBHwt2HGg%2B0_Q%40mail.gmail.com.