Page 1 of 1

[0.17.76][Minor-bug] Crash with bad localization mod definition

Posted: Tue Nov 12, 2019 8:52 pm
by Linver
Hi, experimenting with locale files of mods, I looking for write, in a locale file of a language different from en, a sort of reminder that that some localiziation missing, and I try to do something like this:

item-a=__ITEM__item-a__

I hope that the game will load it from the default locale, but what appen is that Factorio go in loop for a while and after crash, this is the spam of the log:

Code: Select all

ERROR: Factorio crashed due to Stack overflow.
Generating symbolized stacktrace, please wait ...
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B85C744)
00007FFF3B85C744 (ntdll): (filename not available): ZwDelayExecution
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF391F6931)
00007FFF391F6931 (KERNELBASE): (filename not available): SleepEx
f:\dd\vctools\crt\crtw32\stdcpp\thr\cthread.c (68): _Thrd_sleep
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\crashhandler.cpp (443): CrashHandler::SehHandler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF392AF67A)
00007FFF392AF67A (KERNELBASE): (filename not available): UnhandledExceptionFilter
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B864AF2)
00007FFF3B864AF2 (ntdll): (filename not available): memset
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B84C6D6)
00007FFF3B84C6D6 (ntdll): (filename not available): _C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B8611FF)
00007FFF3B8611FF (ntdll): (filename not available): _chkstk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B82A289)
00007FFF3B82A289 (ntdll): (filename not available): RtlRaiseException
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFF3B85FE6E)
00007FFF3B85FE6E (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-build-nvjhnu\libraries\trio\trio.c (1955): TrioParse
c:\cygwin64\tmp\factorio-build-nvjhnu\libraries\trio\trio.c (3990): TrioFormat
c:\cygwin64\tmp\factorio-build-nvjhnu\libraries\commonutil\stringutil.cpp (44): ssprintf
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (81): MacroReplacer::operator()
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (27): <lambda_ab2052e4cfa2cc753694264dc001ade9>::operator()
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\algorithm (90): std::for_each<std::regex_iterator<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,char,std::regex_traits<char> >,<lambda_ab2052e4cfa2cc753694264dc001ade9> >
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (40): RegexUtil::regex_replace<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,std::regex_traits<char>,char,ReplacerWrapper>
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (167): FullReplacer::replace
c:\cygwin64\tmp\factorio-build-nvjhnu\src\globalcontext.cpp (1263): GlobalContext::localise
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (132): ItemMacroReplacer::apply
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (82): MacroReplacer::operator()
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (27): <lambda_ab2052e4cfa2cc753694264dc001ade9>::operator()
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\algorithm (90): std::for_each<std::regex_iterator<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,char,std::regex_traits<char> >,<lambda_ab2052e4cfa2cc753694264dc001ade9> >
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (40): RegexUtil::regex_replace<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,std::regex_traits<char>,char,ReplacerWrapper>
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (167): FullReplacer::replace
c:\cygwin64\tmp\factorio-build-nvjhnu\src\globalcontext.cpp (1263): GlobalContext::localise
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (132): ItemMacroReplacer::apply
c:\cygwin64\tmp\factorio-build-nvjhnu\src\info\macroreplacer.cpp (82): MacroReplacer::operator()
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (27): <lambda_ab2052e4cfa2cc753694264dc001ade9>::operator()
c:\program files (x86)\microsoft visual studio\2017\buildtools\vc\tools\msvc\14.15.26726\include\algorithm (90): std::for_each<std::regex_iterator<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,char,std::regex_traits<char> >,<lambda_ab2052e4cfa2cc753694264dc001ade9> >
c:\cygwin64\tmp\factorio-build-nvjhnu\src\util\regexutil.hpp (40): RegexUtil::regex_replace<std::_String_const_iterator<std::_String_val<std::_Simple_types<char> > >,std::regex_traits<char>,char,ReplacerWrapper>
...
it is repeated for many times.

I know that this isn't a true bug report because is a bad mod define problem, but because the mods shouldn't be able to crash Factorio without give a precise error report, I have think to report it (in another way, I know in this case where is the error but Factorio don't say explicitly that the error is related to a loop in one locale file, so other modders could make this crash and don't know it)

Re: [0.17.76][Minor-bug] Crash with bad localization mod definition

Posted: Wed Nov 13, 2019 1:53 pm
by Rseding91
Thanks for the report. If I think of a clean way to check for this that doesn't make all locale slower I'll do that. For now, just don't do that :P