[2.0.49] hard crash to desktop when creating & raising entity in entity created events
Posted: Wed May 14, 2025 11:50 am
Ran into this whilst developing my space debris mod (tried to spawn extra asteroids when there was excessive trash), boiled it down to just this code example:
- create a new world
- ensure that code is run (through mod or /c)
- place any entity down
- instantly crash to desktop (if on mac "factorio quit unexpectedly" window should appear)
Mac crash report available through discord.
Code: Select all
script.on_event({defines.events.on_built_entity, defines.events.script_raised_built}, function(event)
local entity = event.entity
entity.surface.create_entity{
name = entity.name,
force = entity.force,
position = entity.position,
raise_built = true,
}
end)
- ensure that code is run (through mod or /c)
- place any entity down
- instantly crash to desktop (if on mac "factorio quit unexpectedly" window should appear)
Mac crash report available through discord.