digtron
digtron copied to clipboard
Digtrons losing entire sections of parts at random
Digtrons seem to loose entire sections of parts. First it happened to one player with a decently sized digtron (~50 digging heads lost at random), then it happened to a player with ~100 digging heads. So I assumed that it just wasn't smart for people to run huge digtrons at laggy times. But then someone with 4 digtron heads lost them (with only one other person online, so likely no lag). No debug.txt output showing anything went wrong at any of these times. Interestingly, the large digtrons lost all of the front diggers, where the 4-digger digtron lost the second section of diggers. I am looking for possible causes, but opened this in case it helped.
Info from the 4-digtron user:
I had interupted the cycle so that i could look into a cave opening, and on resume, it didn't dig the sides.
Perhaps there is a race condition somewhere? But as far as I know, this was not the case for the other two losses.
Did this just start happening with the latest commits, or is it a longstanding issue? Are you on a recent 5.0 version of Minetest, or still back on 0.4.16? I'll try to reproduce it locally. I've already started work on a branch where I'm doing general cleanup and optimization so that might help too, I've discovered that Lua can do strange things when its garbage collection gets overwhelmed.
I've never experienced it until I started using it on my server (past month).
or still back on 0.4.16?
Latest stable, 0.4.17.1
I was finally able to reproduce this bug on my local machine. After a whole bunch of tinkering I think I found a way to stop it, or at least the manifestation of it that I was getting; there was apparently a way to get incomplete digtron layouts read into memory when a digtron was adjacent to unloaded blocks. I've put a stop to that and when I did the bug stopped reproducing locally again.
If this was all that was causing this then I'm going to find a way to travel back in time and punch myself in the neck. But at least most of the optimization work I did in the past while was stuff that was good to do anyway.