[0.15.5] game crash and unresponsive UI with bad mod code

This subforum contains all the issues which we already resolved.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[0.15.5] game crash and unresponsive UI with bad mod code

Post by sparr »

Code: Select all

script.on_runtime_mod_setting_changed(onRuntimeModSettingChanged)
I am aware that this is not valid code. This bug report is about the game's behavior upon encountering this code in a mod's control.lua.

First, the game pauses while generating/loading. Then there's a crash dialog asking if I want to see a log (excerpted below). Then, weirdly, the game UI continues to be visible with the paused generating/loading screen. It responds to no input. I have to kill the process to get rid of it.

Crash log excerpt:

Code: Select all

  83.606 Error CrashHandler.cpp:232: Received SIGSEGV
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x000000010087b5b2 in Logger::logStacktrace(StackTraceInfo*) (in factorio) (Logger.cpp:408)
#1  0x000000010086c99d in CrashHandler::writeStackTrace() (in factorio) (CrashHandler.cpp:106)
#2  0x000000010086c92e in CrashHandler::SignalHandler(int) (in factorio) (CrashHandler.cpp:237)
#3  0x00007fffcbceab3a in 0x00007fffcbceab3a
#4  0x000000000000000b in 0x0000000b (in factorio)
#5  0x0000000100b4de90 in LuaBinder<LuaCustomTable>::callWrapper(lua_State*) (in factorio) (LuaBinder.hpp:312)
#6  0x0000000100bd546a in luaD_precall(lua_State*, lua_TValue*, int) (in factorio) + 746
#7  0x0000000100bd58fb in luaD_call(lua_State*, lua_TValue*, int, int) (in factorio) + 59
#8  0x0000000100bd5f2e in luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) (in factorio) + 94
#9  0x0000000100bd7f83 in GCTM(lua_State*, int) (in factorio) + 243
#10 0x0000000100bd74ae in luaC_freeallobjects(lua_State*) (in factorio) + 190
#11 0x0000000100be3772 in close_state(lua_State*) (in factorio) + 34
#12 0x00000001007d26ec in LuaGameScript::LuaGameScript(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, PackagePath const&, PackagePath const&, PackagePath const&, Mod const*, LuaRemote*, LuaCommandProcessor*, LuaSettings*, LuaEventDispatcher*, Scenario*, Map&) (in factorio) (LuaState.hpp:20)
#13 0x00000001007645a0 in LuaContext::createScript(Mod const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, PackagePath const&, bool) (in factorio) (LuaContext.cpp:194)
#14 0x00000001007638c7 in LuaContext::LuaContext(PackagePath const&, PackagePath const*, MapDeserialiser*, TargetDeserialiser*, std::__1::vector<Mod*, std::__1::allocator<Mod*> > const&, Scenario*, Map&) (in factorio) (LuaContext.cpp:41)
#15 0x0000000100755b31 in Scenario::createLuaContext(bool, PackagePath const*, MapDeserialiser*, Scenario&, TargetDeserialiser*) (in factorio) (Scenario.cpp:418)
#16 0x00000001000496a8 in Scenario::loadFactory(boost::filesystem::path const*, boost::filesystem::path const&, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool, ProgressObserver*, bool, InputListener*) (in factorio) (Scenario.cpp:230)
#17 0x0000000100750b26 in ParallelScenarioLoader::doLoad(ParallelScenarioLoader*, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool) (in factorio) (ParallelScenarioLoader.cpp:116)
#18 0x0000000100b2f4a9 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(ParallelScenarioLoader*, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool), ParallelScenarioLoader*, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool> >(void*) (in factorio) (thread:358)
#19 0x00007fffcbcf49af in 0x00007fffcbcf49af
#20 0x00007fffcbcf48fb in 0x00007fffcbcf48fb
#21 0x00007fffcbcf4101 in 0x00007fffcbcf4101

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.5] game crash and unresponsive UI with bad mod code

Post by Rseding91 »

Can you upload the broken mod and steps to reproduce the crash?
If you want to get ahold of me I'm almost always on Discord.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [0.15.5] game crash and unresponsive UI with bad mod code

Post by sparr »

I'm sorry, I didn't think to take a snapshot of the whole mod when this happened. I did narrow it down to adding that single line, but I was in the middle of working on other stuff at the time :(

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.5] game crash and unresponsive UI with bad mod code

Post by Rseding91 »

Thanks for the report. I managed to reproduce the problem and I've fixed the crash for the next version of 0.15.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”