Closed yanfrimmel closed 2 months ago
The problem is in these lines:
var vertices: [6 * 1024]sshape.Vertex = undefined;
var indices: [16 * 1024]u16 = undefined;
Those arrays are too large, that causes segmentation fault, consider using heap allocations.
Ah, the Emscripten stack size reduction strikes again :/ (a little while ago, Emscripten reduced the default stack size to 64 KBytes).
I fixed the problem like this instead:
https://github.com/floooh/sokol-zig/commit/c5bdb504ea562eaa2c7d8c655e20467a1e385e3a
PS: thanks for taking the time to write the ticket, much appreciated :)
Error when running:
zig build run-shapes -Dtarget=wasm32-emscripten
Error details:
Uncaught RuntimeError: unreachable executed tick http://localhost:6931/shapes.js:1725
In the function 'if' statement: