I have been trying to get one of my projects working with Emscripten and I’ve almost got everything up and running but I’m getting an alignment error in the browser and I have no clue what’s causing it.
The actual code is right here, on the
The exact error is:
Uncaught abort("alignment fault") at Error at jsStackTrace (http://localhost:8000/main.js:1667:13) at stackTrace (http://localhost:8000/main.js:1684:12) at abort (http://localhost:8000/main.js:11888:44) at alignfault (http://localhost:8000/main.js:1053:3) at SAFE_HEAP_LOAD_i32_4_4 (wasm-function:39) at __ZN4core4cell13Cell_LT_T_GT_3get17ha7292d0f274620b2E (wasm-function:45) at __ZN5alloc2rc8RcBoxPtr6strong17h9d76bc796af30b74E (wasm-function:51) at __ZN5alloc2rc8RcBoxPtr10inc_strong17h974f8b274d2ef40bE (wasm-function:36) at __ZN61__LT_alloc__rc__Rc_LT_T_GT__u20_as_u20_core__clone__Clone_GT_5clone17h42ec3c5edf9a6750E (wasm-function:36) at dynCall_ii (wasm-function:14)
If I check the logs, I see that there seems to be some sort of memory corruption going on, but I don’t know how to figure out what’s causing it. Any pointers to tools or ways to debug this issue?
The weird thing is that it’s working fie when compiled for desktop or mobile platforms.
Thanks in advance!