-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command line argument handling does not work in release builds #1249
Comments
Reversing the arguments will work though, for example
I am encountering the same issue with Visual Studio 2022 under Windows 10. |
This is nigh impossible to debug. The issue only shows up in a proper release build. Doing a "release with debug" build in MSVC works fine. I'm looking it into, but I'm kinda stumped. This is sadly a part of our framework with close to no code documentation. |
I'll take a look if I get a chance; but it seems to work fine in Linux (as expected). Windows doesn't like things to perform the exact same in debug and release, so it's one of those bugs... I might not be able to help until the next time I'm in front of a Windows machine. |
I'm trying to get behind the issue on Windows. If I can't find the reason I'll scream for help ;) When setting the C++ warning level to all, I actually do get some warnings from MSVC that hint at an issue with the use of auto. Might be a clue. |
Understood, I'll hold off looking at it then. Lemme know if you need help. |
;-) I keep pushing to have warnings on highest level on all platforms and treated as errors. Warnings are how the IDE does it's best to help us and ignoring the help leads to bad days. |
Yeah, we probably should discuss that on one of our next calls. There are lots of warnings in our code when all warnings are enabled. The CLI11 library we use for CLI command parsing also has a slew of compiler warnings, maybe it's time to replace it. The code for command line argument handling in our samples seems unnecessarily complex. |
Just wanted to confirm this bug only occurs on Release; RelWithDebInfo also parses cmd args correctly. |
Raising this for @tomadamatkinson 's attention. Tom, this might be something you have insights into? |
When running a release build, all command line arguments that require an additional argument fail like this:
Command line was:
sample mesh_shading --shading-language hlsl
In a debug build, command line argument handling works fine. This hints at undefined behavior somewhere in the argument handling of the framework.
The text was updated successfully, but these errors were encountered: