Compute Task Pool panicked at attempt to add with overflow - github build
Yairama opened this issue · 2 comments
Hello!
I was using the block mesh library directly from github using block-mesh = {git = "https://github.com/bonsairobo/block-mesh-rs"}
in my Cargo.toml file.
Problem: i get the error thread 'Compute Task Pool (5)' panicked at 'attempt to add with overflow', /home/yairama/.cargo/git/checkouts/block-mesh-rs-d08695c2c9849c77/71aa5de/src/greedy/merge_strategy.rs:71:28
(the compute task pool number varies for each build)
the error is generated by the greedy_quads funcion:
greedy_quads( &voxels, &ChunkShape {}, [0; 3], [CHUNK_SIZE_U32-1; 3], &faces, &mut buffer, );
(ChunkSize is 32 and ChunkShape is ConstShape3u32<32,32,32>
** The error only apperas with cargo run
command, when i use cargo run --release
it runs perfectly **
Also when i use the crate io build ( block-mesh = "0.2.0"
in my Cargo.toml file ) it runs perfectly.
Nice find. I think that should be a wrapping_add
. I'll cook up a fix real quick.
This should fix it!