mekanism / Mekanism

A mod for Minecraft
MIT License
1.37k stars 523 forks source link

Digital Miner randomly stops #7649

Open SirEndii opened 1 year ago

SirEndii commented 1 year ago

Issue description

We play ATM8 on a private server, and we have the problem that digital miner randomly stops mining. This can happen after a night(IRL) or just 10 minutes. When we go home, working a bit on other stuff and coming back 15 minutes later to our miners, it's like they got a reset.

"To mine" goes to 0 and after clicking on stop and reset, it starts to search again. It's like someone deleted the cache while it was running... after hitting stop, reset and start again, it searches, finds 300k ores and starts to mine.

We use anchor upgrades AND FTB Chunks chunk loading The teleporter works(Without upgrade), so the chunk does not seem to be the problem here.

After starting: image

Coming back: image

Steps to reproduce

  1. Place a digital miner - We have our like 5k-10k blocks away from the spawn and homes
  2. Use filters - We use tag filters like forge:ores or minecraft:logs. Often both together
  3. We use a radius of 128 with a min height of -64 and a max height of 319
  4. Go home
  5. Come back after like 5-15 minutes
  6. "To mine" is zero, but it's "Ready" and "Running"

Minecraft version

1.19.2 (Latest)

Forge version

43.1.43

Mekanism version

10.3.4 (Latest)

Other relevant versions

ATM8 v0.1.5

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

SirEndii commented 1 year ago

Forgot to send a log -> https://gist.github.com/Seniorendi/64b2dd8a825a94635e9b7428fbd2f0ec I uploaded the time of the log where I tested it

UnhappyCodings commented 1 year ago

I can confirm that! It also happens when you standing right next to it. Sometimes it also just doesnt stop. ATM8

pupnewfster commented 1 year ago

This sounds like the chunks it is trying to mine are unloaded. Are all the chunks loaded by the chunk anchors you are using? As looking at ATM8's configs anchor upgrades loading chunks is disabled, so especially if you increase the max radius then it increases the odds that the chunks you are targeting is not loaded and it is waiting for them to load

SirEndii commented 1 year ago

I encountered the same problem in Direwolf 20. And I saw something interesting.

the odds that the chunks you are targeting is not loaded and it is waiting for them to load

This sounds quite right. My server just restarted, I joined and directly clicked on my miner. The "to min" counter was about 25k before the restart. After it to mine slowly, very slowly (like 20 per 3-6 seconds) increased but stopped at 930. Very weird. Clicked reset and start, to mine increaed to 25k and started mining.

Chunkloading is activated image

But I think it's important to mention that we use a radius of 128. With a max and min height of 319/-64

SirEndii commented 1 year ago

https://user-images.githubusercontent.com/67484093/212994828-92a45363-5592-4081-8a8a-462ef4f5f7a3.mp4

Lil' example video The weird shit starts at second 12

pupnewfster commented 1 year ago

Uhhhh but we only decrement that value except for when searching is finished and we update, so I honestly don't see how that video is possible. Except for maybe this relating to loading from disk, except that should only happen at most once so I don't see how it would go up twice.

SirEndii commented 1 year ago

Another thing I just noticed. After the restart, the miner seems to restart and re-scan. But instead of the ~90k it should've scanned, it just scanned about 8k So it seems that the miner re-scans after a restart but has some problems with some chunks and just skips it(?) Just a theory, but maybe it helps you

If you want, you can join our server before and after a restart to observe that with your own eyes

SirEndii commented 1 year ago

The same issue also occurs when we set the max radius too high (way over 256)

pupnewfster commented 1 year ago

Well I realized my previous comment was semi wrong just in that the number will be going up as far as the client side is concerned as the digital miner's search thread runs, but somewhat unsure why it seems to be taking the search thread so long to run. Does manually resetting/stopping it and then starting it again make it find the blocks quicker?

SirEndii commented 1 year ago

Yes it does

SirEndii commented 1 year ago

Another video after a fresh restart → https://cloud.intelligence-modding.de/index.php/s/NMq6EJtFaDEMyJG Not really anything new, but I just thought why not

blackthijs0 commented 1 year ago

I have this exact same issue. I suspect it is not related to chunkloading as I have intentionally set the machine to only mine a very small area. When I press "Start" there are about 100 blocks to mine, then a few seconds later it drops to 0 without having mined any blocks. Edit: I think I found the problem. It has to to with FTb chunks not allowing the Digiminer inside claims, even though it is my digiminer in my claim.

SirEndii commented 1 year ago

I was never able to test this with the newest mek version since I stopped playing the block game

Lord-Volkner commented 1 year ago

I'm having this same issue. I don't think it's a chunk loading issue because I haven't left the area. I'm standing beside the miner and it isn't doing anything.

It did at first. It mined about half the area, then it quit. Now I can't get it to restart no matter what I do. I've moved to a different area. I don't know what else to try.

I know that the block I want to mine is present. The miner is sitting right on top of it. Soul Sand

blackthijs0 commented 1 year ago

@Lord-Volkner Did you see the last edit to my post? Can you confirm if the chunks giving the problems are claimed by "FTB chunks"? If so, you can probably fix it by temporarily unclaiming or allowing machines to modify by enabling "fake players"

SirEndii commented 1 year ago

You can tell ftb chunks that he's allowed to mine in this chunks

Lord-Volkner commented 1 year ago

@blackthijs0

Thanks, but it turns out that my problem was an ID10T error. I accidentally set both the min and the max to the same value, so of course nothing happened. With proper settings, it's working just fine.

What was I thinking?

WallaceFvck commented 3 months ago

It was happening to me, loading chunks from the FTB was buggy on the Digital Miner, so I put a Familiar from Mahou Tsukai to load the chunk and it resolved it. (Yes, my Digital Miner's chunk limit was increasing)

Maybe outer chunk loading methods work, but I only tested it with Familiar.

image