Page 1 of 1

[2.0.76] Team production - placing pattern cause on_marked_for_deconstruction crash.

Posted: Sun Apr 19, 2026 6:36 pm
by marcB
I attached a video showing this error.

What did you do?

Playing team production
Having 2 filled inserted into the ground with the space needed to place a furnace

What happened?
Placing the furnace using drones caused the scenario to output a lua error.

Code: Select all

The scenario level caused a non-recoverable error.
Please report this error to the scenario author.

Error while running event level::on_marked_for_deconstruction (ID 28)
__base__/script/team-production/team_production.lua:1085: bad argument #3 of 3 to '__index' (string expected, got nil)
stack traceback:
	[C]: in function '__index'
	__base__/script/team-production/team_production.lua:1085: in function 'handler'
	__core__/lualib/event_handler.lua:72: in function <__core__/lualib/event_handler.lua:70>
What did you expect to happen instead? It might be obvious to you, but do it anyway!
For the furnace to be place without crashing my game.

Does it always happen, once, or sometimes?
Always repeatable.

Save => bug to report.zip (red team, it's the save used in the video)
Log => factorio-current.log

Re: [2.0.76] Team production - placing pattern cause on_marked_for_deconstruction crash.

Posted: Mon May 04, 2026 10:33 am
by boskid
Thanks for the report. Issue is now fixed for 2.1.

This issue was caused by the scenario scripting not accounting for on_marked_for_deconstruction event possible without player_index, however when construction robot tried to revive the ghost, some of the colliding items that were on ground were picked up by the robot, unable to be inserted into revived entity and as such robot tried to drop them on the ground again but in a non colliding position and marked them to be deconstructed. Since they were marked for deconstruction by the robot which is not a player interaction, the event was missing player_index as designed and caused scenario to crash.