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

marcB
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Apr 19, 2026 6:23 pm
Contact:

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

Post 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
Attachments
factorio-current.log
(8.8 KiB) Downloaded 13 times
Factorio - 2026-04-19 8-34-23 PM.mp4
(17.66 MiB) Downloaded 16 times
bug to report.zip
(674.43 KiB) Downloaded 14 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4513
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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.
Post Reply

Return to “Fixed for 2.1”