[0.12.3] [cube] Can't save with invalid locale
Posted: Tue Aug 11, 2015 7:57 pm
Have LC_ALL=garbage in the environment or otherwise broken locale settings. Try saving the game.
When using the GUI you get a message box saying "locale::facet::_S_create_c_locale name not valid" and the game is not saved.
The headless server dies with
Maybe you could just print a stern message and fall back to a default locale when that happens so people could still save their game.
When using the GUI you get a message box saying "locale::facet::_S_create_c_locale name not valid" and the game is not saved.
The headless server dies with
Code: Select all
$ LC_ALL=garbage ./factorio --create abcd
0.000 2015-08-11 21:48:06; Factorio 0.12.3 (Build 16287, linux64)
0.000 Operating system: Linux
0.000 Program arguments: "./factorio" "--create" "abcd"
0.000 Read data path: /home/prg/Downloads/factorio/data
0.000 Write data path: /home/prg/Downloads/factorio
0.000 Binaries path: /home/prg/Downloads/factorio/bin
0.015 Running in headless mode
0.018 Loading mod core 0.0.0 (data.lua)
0.021 Loading mod base 0.12.3 (data.lua)
0.360 Factorio initialised
Creating a new map in /home/prg/Downloads/factorio/saves
1.503 Verbose Scenario.cpp:528: Saving game as /home/prg/Downloads/factorio/saves/abcd
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
sh: warning: setlocale: LC_ALL: cannot change locale (garbage)
1.896 Warning Logger.cpp:315: Symbols.size() == 28, usedSize == 19
Factorio crashed. Generating symbolized stacktrace, please wait ...
sh: warning: setlocale: LC_ALL: cannot change locale (garbage)
2.256 Warning Logger.cpp:315: Symbols.size() == 27, usedSize == 18
#0 0x7fa7395afe80 in ?? at ??:0
#1 0x7fa7395afe07 in ?? at ??:0
#2 0x7fa7395b116a in ?? at ??:0
#3 0xe0b2cd in __gnu_cxx::__verbose_terminate_handler() at ??:?
#4 0xd7dfa6 in __cxxabiv1::__terminate(void (*)()) at ??:?
#5 0xd7dff1 in std::terminate() at ??:?
#6 0xd7fdc8 in __cxa_throw at ??:?
#7 0xdd7e5f in std::__throw_runtime_error(char const*) at ??:?
#8 0xd8ae24 in std::locale::facet::_S_create_c_locale(__locale_struct*&, char const*, __locale_struct*) at ??:?
#9 0xd8dda9 in std::locale::_Impl::_Impl(char const*, unsigned long) at ??:?
#10 0xd8e8ad in std::locale::locale(char const*) at ??:?
#11 0xcbdd17 in boost::filesystem::path::codecvt() at crtstuff.c:?
#12 0xcbe6c6 in boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*) at crtstuff.c:?
#13 0x92edf6 in std::string::operator=(std::string const&) at /usr/include/c++/5/bits/basic_string.h:2948
#14 0x930e7a in operator= at /home/build/build_environment/boost_1_58_0/output_linux64/include/boost/filesystem/path.hpp:182
#15 0xa4ab9c in _ZN13TemporaryFileC4ERKSs at /tmp/factorio-GAdmeA/src/Util/TemporaryFile.cpp:12
#16 0x7fa73959caa5 in saveAs at /tmp/factorio-GAdmeA/src/Scenario/Scenario.cpp:533
#17 0x40a3c9 in std::string::_M_rep() const at /usr/include/c++/5/bits/basic_string.h:2694
2.256 Error Util.cpp:46: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.