> On Apr 16, 2024, at 12:39, 'Sam Clegg' via emscripten-discuss 
> <emscripten-discuss@googlegroups.com> wrote:
> 
>  
> Can you click on the little red arrow next to the "Aborted" message in the 
> console?  It should show the stack trace.

Aborted(Assertion failed: native function `__main_argc_argv` called before 
runtime initialization) es3loadtests.js:789:6 
<http://127.0.0.1:8080/es3loadtests.js>
    abort http://127.0.0.1:8080/es3loadtests.js:789
    assert http://127.0.0.1:8080/es3loadtests.js:522
    createExportWrapper http://127.0.0.1:8080/es3loadtests.js:836
    <anonymous> debugger eval code:1

Here is the createExportWrapper function with the assert that is firing

function createExportWrapper(name, nargs) {
  return (...args) => {
    assert(runtimeInitialized, `native function \`${name}\` called before 
runtime initialization`);
    var f = wasmExports[name];
    assert(f, `exported native function \`${name}\` not found`);
    // Only assert for too many arguments. Too few can be valid since the 
missing arguments will be zero filled.
    assert(args.length <= nargs, `native function \`${name}\` called with 
${args.length} args but expects ${nargs}`);
    return f(...args);
  };
}

This is only happening when the code is compiled -O0, -g. When compiled -O3 the 
app runs with the debugger open.

Regards

    -Mark

-- 
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/9A4B06C8-CFB9-4161-A378-B1EB50FA7278%40callow.im.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to