Sadly the thread sanitizer is still broken(https://github.com/ziglang/zig/issues/15241), so I cannot get clear data on where the data race is happening.
Observable symptoms:
thread 13466 panic: index out of bounds: index 78, len 62
/home/mint/Cubyz/src/chunk.zig:1095:30: 0x7deb33 in renderTransparent (Cubyzig)
self.sortingOutputBuffer[buckets[bucket]] = self.currentSorting[i].face;
^
/home/mint/Cubyz/src/renderer.zig:239:35: 0x7e6212 in renderWorld (Cubyzig)
try meshes[i].renderTransparent(playerPos);
^
/home/mint/Cubyz/src/renderer.zig:150:18: 0x7eee0c in render (Cubyzig)
try renderWorld(world, ambient, skyColor, playerPosition);
^
/home/mint/Cubyz/src/main.zig:749:22: 0x7ffe52 in main (Cubyzig)
try renderer.render(game.Player.getPosBlocking());
^
/home/mint/Downloads/zig/lib/std/start.zig:486:37: 0x8022ee in main (Cubyzig)
std.os.argv = @as([*][*:0]u8, @ptrCast(c_argv))[0..@as(usize, @intCast(c_argc))];
^
Sadly the thread sanitizer is still broken(https://github.com/ziglang/zig/issues/15241), so I cannot get clear data on where the data race is happening. Observable symptoms: