ZenonSeth / logistica

A Minetest item transport and storage mod
Other
1 stars 4 forks source link

Crafting Supplier infinite loop #6

Closed Maverick2797 closed 5 months ago

Maverick2797 commented 7 months ago

I haven't looked through the source, but having a crafting supplier making steel blocks from ingots, and another making steel ingots out of blocks causes the MT engine to hang if you try to take more than what's in storage. I suspect an infinite recursion loop as there's nothing logged in the debug.txt when I force close the program.

ZenonSeth commented 7 months ago

There are actually specific checks which I have put in, and have tested and verified that they work - in this commit a couple of months ago - to prevent exactly that kind of infinite recursion scenario due to crafters using each other in a loop. The cause would have to be something else, if you were using it via an Access Point it may be related to that.

I would have to reproduce this issue to tell for certain, but as mentioned, it's likely not circular crafting supplier usage.

ZenonSeth commented 7 months ago

I've attempted to reproduce this on the latest release 0.9.4/0.9.5 - and cannot. The depth check I linked to above prevents infinite loops from happening, even when used from an Access Point - so if you run into this issue again, I would appreciate some sort of steps to reproduce, otherwise I don't know what needs fixing.

ZenonSeth commented 5 months ago

I've recently updated the supply crafters, fixing another bug that was reported - and in doing so I did a lot of testing of supply crafters. I cannot reproduce this issue - if you set up a lot of supply crafters that use each other, it's possible to get a slight lag, but they don't actually cause a freeze.

I'm closing this bug for now - if you encounter it again, I would greatly appreciate some steps, and maybe a picture of your setup, so I can try to see what could be causing this - but I suspect the bug is no longer present.