Ender IO Zoo

Ender IO Zoo

962k Downloads

Strange Farming Station crash.

NEXUS2345 opened this issue ยท 5 comments

commented

Issue Description:

When the player placed down the Farming Station and placed an axe into the interface, the server crashed with the below stack trace. Server is running SpongeForge and is running a modpack. Modpack is 'AeonPack 1.10.2' on Twitch App. SpongeForge version 5.2.0-BETA-2353.

What happens:

Place down Farming Station.
Place axe in Farming Station (tested with Diamond Axe, and modded RF axes).
Server crashes with stacktrace shown below.
When server comes back up, farming station has lost its inventory.

What you expected to happen:

Place down Farming Station.
Place axe in Farming Station.
Nothing should now happen as Farming Station has no power.

Steps to reproduce:

  1. Place down Farming Station.
  2. Place axe into farming station.

Affected Versions (Do not use "latest"):

  • EnderIO: 3.1.193
  • EnderCore: 0.4.1.66
  • Minecraft: 1.10.2
  • Forge: 12.8.3.2136

Your most recent log file where the issue was present:

https://gist.github.com/NEXUS2345/86f8f1228bea0693822582169691e265 - crash report

I hope this is enough info for you. We aren't 100% sure how this is happening due to the nature of the crash. For clarification, the modpack is developed by us for our server. If you want to get in contact with me via Discord that is possible. Thanks for any help.

commented

Did you forget to mention the gigantic tree in your report or does it really not exist at all? ;)

commented

Thank you for that comment. I had another talk with the player and have found out that at the time, the farming station was surrounded by a lot of fully grown spruce trees. Almost a gigantic tree as you put it. I would still imagine this is a bug however, not sure if you would agree with that though.
At least now we can inform our players to avoid setting up farming stations among large numbers of already grown trees.

commented

Ok, so it was a "tree too big" error, not an "infinite loop" bug.

Guarding something against an input set that is too big is always hard. Even harder when you don't actually know what "too much" is. I'll have a look if I can add some limiter there. That'll probably earn me some "that tree wasn't harvested completely!!!1!!11!" reports ;) ;)

commented

You could loop over it breadth-first instead of using recursion:

  1. Make a queue of stuff to harvest
  2. Add root
  3. In a loop, move the first queue element to the result set, and add its neighbors to the queue

That would get rid of the stack overflow.

Now I don't actually know what you're doing with that tree, but if you're just removing it, I could imagine that you could iterate the tree (literally) down to the leaves (literally) and then remove those first. next tick, there'll be less crap to iterate, so the tree gradually disappears

commented

If you iterate the result set from the algorithm above in reverse order, you should get the elements in topological order, starting from the leaves.
Might help in preventing loss of leaves due to decay.