Closed bjorn3 closed 4 years ago
The veloren-voxygen
panic is reproducible with cg_llvm. Pulling the latest version of veloren fixed it. It now only gets stuck in a loop containing std::thread::yield_now
.
On macOS there is now a linker error: https://gist.github.com/bjorn3/6e946da49d695618c3c5d570c06fdc95
Hey! I'm one of the core developers of Veloren. If there's anything we can help with related to Veloren let us know!
@Songtronix Thanks for the offer. This is just a bug in cg_clif, not veloren though. I probably used the wrong linkage or visibility for those symbols.
I think I used ../cargo.sh build --release
. Veloren is configured to use LTO in release mode. Because cg_clif doesn't support LTO, no object file for the LTO result will be created. However the linker code will still omit the object files created by cg_clif during compilation of the rlibs. Because of this there are many object files missing, causing a linker error. I will add a warning when using LTO for now.
The server panics inside rayon at https://github.com/rayon-rs/rayon/blob/87dfd36a3b1c1a811b531edf90d39061ab12ef56/src/iter/collect/mod.rs#L108. Likely because the non atomic implementation of atomics in cg_clif produces a wrong result.
At the first try the client produced sound with stuttering (I think this is expected for a build with optimizations equivalent to llvm's -O0), but it hung before the first paint. At the second try it did work, but I think connecting to the server timed-out and the next attempt to connect, it panicked among other places inside rayon.
All panics when trying to use single player seem to be caused by atomic intrinsics not being atomic. cc #867
I emulated atomic instructions using a global lock in 204bb38a32e301e8550e8b6880c16da2b84503c6. This fixes all panics. Unfortunately the map generation is very slow, so I haven't been able to play it using cg_clif yet.
https://gitlab.com/veloren/veloren/
When built using the
wip_tls_support
branch of cg_clif multiple veloren binaries crash:veloren-voxygen
panics withcalled
Result::unwrap()on an
Errvalue: \"Not a valid MagicaVoxel .vox file\"
when starting:veloren-server-cli
panics withAlready borrowed mutably: InvalidBorrow
when trying to connect using cg_llvm build client:This may be because to the fact that atomics are not yet supported.