[Rseding91] [0.14.13] Possible deconstruction bug

This subforum contains all the issues which we already resolved.
Post Reply
canidae
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Feb 18, 2016 6:24 pm
Contact:

[Rseding91] [0.14.13] Possible deconstruction bug

Post by canidae »

This behavior is extremely peculiar and it took me ages to figure out a way to reliably reproduce it.
When a mod invokes "order_deconstruction" on a belt entity in front of a mining drill output, that belt may not be deconstructed (despite being marked with a red cross in the game). This may happen when a mod caches the belt entities in eg. "on_init" and then tries to deconstruct the entities in "on_tick".
I've attached a simple mod and a savegame that displays this peculiar behavior.
Running the following command before the mod manage to mark the belts in front of the mining drills for deconstruction will cause all belts to be removed:

Code: Select all

/c for _, entity in pairs(game.surfaces[1].find_entities_filtered{name="transport-belt", force="player"}) do entity.order_deconstruction(entity.force) end
Letting the mod mark all belts for deconstruction and then (optionally) run the same command will likely result in some belts being left as shown on the image below:
deconstruct_bug.png
deconstruct_bug.png (1.58 MiB) Viewed 1981 times
I tried to load the savegame disabling all other mods except the attached mod just to rule out interference from other mods, but this resulted in Factorio crashing. I've attached the log file from this crash.
By additionally including mod "Creative Mode" I was able to load the savegame, and with only these two mods I was still able to reproduce the error.
Attachments
factorio_crash_0.14.13.log
(4.18 KiB) Downloaded 125 times
deconstruct-bug_0.0.1.zip
(966 Bytes) Downloaded 105 times
auto_upgrade_test.zip
(2.04 MiB) Downloaded 103 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.14.13] Possible deconstruction bug

Post by Rseding91 »

Fixed for 0.14.14.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”