You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday, I tried to run my code in release so I could do some profiling on some code I had just run in dev. The program would not start, and kept crashing with:
The odd thing is that my code works perfectly fine with --profile=dev, but crashes with --profile=release. I have no idea why, and I am running the exact same copy of my code, only the build profile changes. Also, I have attempted to clean all build artifacts in case some were corrupted, but that has not changed anything.
Previous Issues
I have had this issue a few times before in the past few weeks, but oddly when the previous issues happened, simply executing cargo run again would work fine (without recompiling, just running the program again).
Threads
The issue appears to be happening before my main function is executing. There are a lot of threads: main, 3x ntdll.dll, and 20x rayna_ui.exe!std::sys::windows::thread::impl$0::new::thread_start(). I wonder if it's linked to my use of the static_init crate, which I'm using to initialise some static variables before main(), but I have no evidence for this.
Reproducing
My current setup is reproducible:
Commit 41b1dcfca33034ab5cb98d6d2c5ea7d9194c9635 consistently causes the bug for me
Commit 0732551e1dc5f895f5837f3f69801c2fa7a424bf (removed crate static_init) consistently works fine
My repository setup is a little borked right now; I have a few repos that I have forked, and a few more that are not published to github. I am in the process of fixing this, and will post an update as soon as it is fixed. For now I will provide an online link to download a copy of the entire folder structure: https://drive.proton.me/urls/FJZ41HCGTR#Rok13riFviH3
The text was updated successfully, but these errors were encountered:
Background
I am working on a CPU ray-tracer, my project is called Rayna.
Compiler
Issue
Problem
Yesterday, I tried to run my code in release so I could do some profiling on some code I had just run in dev. The program would not start, and kept crashing with:
Stacktrace
This is the stacktrace from the debugger (RustRover). Setting
RUST_BACKTRACE=1
does not seem to change the output or give a stacktraceThoughts
Build Profile Oddities
The odd thing is that my code works perfectly fine with
--profile=dev
, but crashes with--profile=release
. I have no idea why, and I am running the exact same copy of my code, only the build profile changes. Also, I have attempted to clean all build artifacts in case some were corrupted, but that has not changed anything.Previous Issues
I have had this issue a few times before in the past few weeks, but oddly when the previous issues happened, simply executing
cargo run
again would work fine (without recompiling, just running the program again).Threads
The issue appears to be happening before my main function is executing. There are a lot of threads:
main
, 3xntdll.dll
, and 20xrayna_ui.exe!std::sys::windows::thread::impl$0::new::thread_start()
. I wonder if it's linked to my use of thestatic_init
crate, which I'm using to initialise some static variables beforemain()
, but I have no evidence for this.Reproducing
My current setup is reproducible:
41b1dcfca33034ab5cb98d6d2c5ea7d9194c9635
consistently causes the bug for me0732551e1dc5f895f5837f3f69801c2fa7a424bf
(removed cratestatic_init
) consistently works fineMy repository setup is a little borked right now; I have a few repos that I have forked, and a few more that are not published to github. I am in the process of fixing this, and will post an update as soon as it is fixed. For now I will provide an online link to download a copy of the entire folder structure: https://drive.proton.me/urls/FJZ41HCGTR#Rok13riFviH3
The text was updated successfully, but these errors were encountered: