Hey,
This exact crash got reported to me on the
mod discussion pages recently (ConstructionPlannerContinued - renamed to Construction Approvals).
For what it helps, using this bit of code helps reproduce it (based on the description, I assume you already have "working" code for this one, but just for the completeness sake):
Code: Select all
local function on_init()
local player_force = game.forces["player"]
local friend_force = game.create_force("friend")
player_force.set_friend(friend_force, true)
friend_force.set_friend(player_force, true)
end
local function on_built_entity(event)
event.entity.force = game.forces["friend"]
end
script.on_init(on_init)
script.on_event(defines.events.on_built_entity, on_built_entity, {{ filter="type", type="entity-ghost"}})
With this tidbit in control.lua, it is sufficient to place one singular regular belt (not even an underground), and then attempt to force-place a belt at 90-degree angle on top of it. I did notice this didn't used to happen with some older versions of the game. I have tested against 2.0.28 where it worked fine, and the above code and steps crashed the versions 2.0.42, 2.0.43, and 2.0.45. I haven't tested any other versions in-between, though.
Is the crash itself still considered as a game engine bug, though?
On the desync and save-load stable part, I am not 100% sure I understand that part. Normally I have gotten used to desync referring to state (value) differences between two clients (or server/client etc). What I find interesting is that in version 2.0.28 in the scenario I have described, the game will (correctly) mark the placed belt for deconstruction - so that at least seems like a legitimate game state in that version?
Best regards,
Branko