We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
90084dc, Linux
Run OpenTTD compiled with an address sanitizer enabled. Load in a few NewGRFs
Generate lot of errors .. it will happen .. sometimes. Not always.
Doesn't only happen with ErrorWindow, but with any other CopyDParam it can. This is just the easiest to use for that.
==52789==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe9e977608 at pc 0x5637330c67d6 bp 0x7ffe9e976da0 sp 0x7ffe9e976568 READ of size 3 at 0x7ffe9e977608 thread T0 #0 0x5637330c67d5 in __interceptor_strlen (/home/micro/projects/OpenTTD/OpenTTD/build-clang/openttd+0x149d7d5) (BuildId: b7b0ff4a64b9e84cd7d79bda87d27c0e535d6ba6) #1 0x563733174e94 in std::char_traits<char>::length(char const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/char_traits.h:399:9 #2 0x5637334ccd84 in std::basic_string_view<char, std::char_traits<char> >::basic_string_view(char const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/string_view:134:16 #3 0x56373541fbfd in CopyOutDParam(std::vector<StringParameterBackup, std::allocator<StringParameterBackup> >&, unsigned long) /home/micro/projects/OpenTTD/OpenTTD/src/strings.cpp:182:16 #4 0x5637347ba6f4 in ErrorMessageData::CopyOutDParams() /home/micro/projects/OpenTTD/OpenTTD/src/error_gui.cpp:126:2 #5 0x5637347bb3d1 in ShowErrorMessage(unsigned int, unsigned int, WarningLevel, int, int, GRFFile const*, unsigned int, unsigned int const*, unsigned int) /home/micro/projects/OpenTTD/OpenTTD/src/error_gui.cpp:435:7 #6 0x5637347bae14 in ShowErrorMessage(unsigned int, int, int, CommandCost) /home/micro/projects/OpenTTD/OpenTTD/src/error_gui.cpp:389:2
The text was updated successfully, but these errors were encountered:
I happens when SetDParamStr() was used for a previous string, and the pointer is no longer valid.
SetDParamStr()
Sorry, something went wrong.
"I have a patch for that" somewhere.
Remove non-owning string pointer from StringParameter
a1c7d1b
(For the time being) See: OpenTTD/OpenTTD#11922
Successfully merging a pull request may close this issue.
Version of OpenTTD
90084dc, Linux
Steps to reproduce
Run OpenTTD compiled with an address sanitizer enabled.
Load in a few NewGRFs
Generate lot of errors .. it will happen .. sometimes. Not always.
Doesn't only happen with ErrorWindow, but with any other CopyDParam it can. This is just the easiest to use for that.
Upload crash files
The text was updated successfully, but these errors were encountered: