Auto Deconstruct

by mindmix

This mod marks drills that have no more resources to mine for deconstruction.

Utilities
11 days ago
0.13 - 2.0
284K
Mining

b [Fixed] Game freezes when bob's steam powered drill gets depleted

2 years ago
(updated 2 years ago)

Hi, thanks for the great mod.
I am always using this mod when I play factorio with other overhaul mods.

I was using this mod with angel's and bob's mods with a lot of QOL mods.
However at certain tick, the game froze and it took up every memory space available on my PC.
There was no log, no error messages. I just had to quit the game from task manager.

I disabled half of the mods and see if still freezing happens, and narrowed down the source of the bug to this mod and bob's steam powered mining drills.

How to reproduce:
1) Activate this mod with bob's mining mod that provides 2x2 size steam powered mining drill.
2) Create some ore patch with very low reserves, just to make it deplete faster. I used /editor command to create ore patches.
3) place 3 mining drills in a row, provide it with 165℃ steam, wait for the resource to deplete. I used /c game.speed = 20 to fast forward the process.
4) When the drill in the middle gets depleted, game freezes and cause memory overflow.
Also when the drill depletes when I was in map editor, an error message appeared and game did not freeze.
[autodeconstruct|drill.order_deconstruction] Error: [-1, 3] steam-mining-drill instantly deconstructed, nothing else done.

Or you could just see the following save file. Same procedure was applied as what I described above.
https://drive.google.com/file/d/13DNRdNuBl3dyyY0X3-8fDHSr5Sq3HLi3/view?usp=sharing

I hope this bug gets fixed, I really like both bob's mining drills and this mod.
If this mod was not designed to be compatible with these kind of modded mining drills, please mark incompatibility in mod description.

2 years ago
(updated 2 years ago)

Well, that's a new one! Not an intended incompatibility, but certainly not one I've tested yet. Thanks for the report, I'll look into it sometime this week.

In the meantime, you should be able to avoid this infinite loop by disabling the "Remove fluid drills" or "Create pipes" runtime mod settings.

Edit: Pretty sure it's because the code was never tested for even-width miners. It gets stuck in a loop because it can't create a pipe at the dead center of the miner it's replacing. Fixing it will take a more complicated algorithm to build pipes between ports, rather than from each port to the center.

2 years ago

This is fixed in 0.3.2. Pipes will now be built correctly for even-width miners, and ones with pipes in non-centered and non-symmetrical locations. (If it's really weird, there might be some unnecessary pipes built in the center, but they will all connect.)

New response