Skip to content
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

Always getting error unknown from error messages #76

Closed
VwertIX opened this issue Dec 31, 2024 · 4 comments
Closed

Always getting error unknown from error messages #76

VwertIX opened this issue Dec 31, 2024 · 4 comments

Comments

@VwertIX
Copy link

VwertIX commented Dec 31, 2024

So I deliberately deleted a letter from the value string to check out the error it would send and it shows

image

but if i put the error code into the FormatMessageW function it gives the proper system error message for error code 2

image

Which is "The system cannot find the file specified."

It could be that theres something wrong with my computer or something.

@VwertIX
Copy link
Author

VwertIX commented Dec 31, 2024

Ok so apparently error messages are messed up if your locale is set to en-gb.
If I change the language value for FormatMessageW to 2057 which is the one for en-gb it fails whereas if its set to 1033 which is en-US it works.
https://stackoverflow.com/questions/73584099/unknown-error-from-stderror-code-on-windows
https://learn.microsoft.com/en-us/answers/questions/1610991/formatmessage()-fails-with-specific-system-locales

@VwertIX
Copy link
Author

VwertIX commented Dec 31, 2024

Looks like its __std_system_error_allocate_message in syserror_import_lib.cpp causing it.
Apparently its been fixed but the fixed version of it hasn't been released yet.
microsoft/STL#3254
microsoft/STL#5104

@GiovanniDicanio
Copy link
Owner

OK, so it seems a regression introduced in VS 2022, right?
I can leave my code unchanged, and wait for proper fixes in Microsoft's code.
What do you think?

@GiovanniDicanio
Copy link
Owner

Since this looks like a bug introduced at some point in VS 2022, and that was fixed (even if the fixed version has not been released yet), and I got no further feedback from you, I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants