[Klonan] [2.1.12] Crash calling LuaCommandable.set_command() (BuildBaseBehavior::prepareBuilding)
Posted: Wed Jul 29, 2026 4:27 pm
OS: Windows 11 x64 25h2 build 26200.8973
Factorio version: 2.1.12
DLCs: no
Description:
Crash in BuildBaseBehavior::prepareBuilding (Access Violation 0x000000000BADC0DE) when calling LuaCommandable.set_command inside on_build_base_arrived. The Lua event handler itself completes fully, but the game immediately crashes afterward.
The issue is not reproduced in 2.0.77
The issue is reproduced in vanilla and with space age dlc
factorio-previous.log attached
Minimal code that causes the crash (the relevant mod is attached):
Steps to reproduce:
No crash lol
Factorio version: 2.1.12
DLCs: no
Description:
Crash in BuildBaseBehavior::prepareBuilding (Access Violation 0x000000000BADC0DE) when calling LuaCommandable.set_command inside on_build_base_arrived. The Lua event handler itself completes fully, but the game immediately crashes afterward.
The issue is not reproduced in 2.0.77
The issue is reproduced in vanilla and with space age dlc
factorio-previous.log attached
Minimal code that causes the crash (the relevant mod is attached):
Code: Select all
function set_command_function(event)
local biter_group = event.group
biter_group.set_command({
type = defines.command.go_to_location,
destination_entity = storage.crash_chest
})
end
function register_chest(event)
storage.crash_chest = event.entity
end
local event_filter =
{{filter = "name", name = "commandable-crash-test-chest"}}
script.on_event(defines.events.on_built_entity, register_chest, event_filter)
script.on_event(defines.events.on_build_base_arrived, set_command_function)
- Load the game with the attached mod or other implementation of the script above.
- Place the test entity (commandable-crash-test-chest).
- Allow a biter group to trigger a base build expansion.
- When on_build_base_arrived fires and biter_group.set_command is invoked, and the game crashes seemingly on the same tick after the Lua event handler returns
No crash lol