Reliquary Reincarnations

Reliquary Reincarnations

51M Downloads

[1.10.2]Server crash when activated Coin of Fortune on a pedestal has no connected inventories

Not-February opened this issue ยท 9 comments

commented

https://gist.github.com/Febilian/71a71e30afebbb69355e52590095f7a7

Works fine if it has a connected inventory as intended, but could cause issues if people aren't aware of how it works.

commented

Based on stack trace this is a different issue. Seems like the item handler logic is missing a null check in that place. Certainly something that needs fixing.
Just to be extra clear you had two pedestals next to each other, one with coin of fortune and the other with harvest rod, right? Did the harvest rod have any stacks in it before you put it on pedestal?

commented

I believe the harvest rod did have some stuff in it before I put it on the pedestal, yes. And that is exactly what I tried first, the coin of fortune pedestal next to the harvest rod one.

It may be related to me having accidentally put some potatoes in the harvest rod as well after I checked it after, whereas I was under the impression earlier that the only things in it were carrots. I'll do some more testing to see what happens specifically. Maybe it's looking for the currently selected item in the rod and messes up if what's being inserted is different?

commented

Okay, yeah, if there is absolutely nothing but carrots in the harvest rod when the coin tries to insert more carrots, it doesn't crash at all.

commented

Actually this may turn out to be related to #218 since I was attempting to have a coin of fortune pedestal insert items into a pedestal with a harvest rod on it when this happened. I assumed it was because of the lack of an actual inventory attached to the coin, but it may have been the rod.

commented

So I have got to testing this myself and I can't figure out a way to make it crash. whatever way I try to put anything that can be put in harvest rod just works correctly. Did you perhaps have some modded seeds in the harvest rod?

commented

I did not. I had various vanilla crops in it - carrots, potatoes, wheat, maybe beetroot - and in fact, no modded crops even existed in that instance of Minecraft.

On a side note, what happens if a coin of fortune tries to insert wheat into a harvest rod? Would it ignore it? I notice if I put more than one inventory adjacent to the coin on a pedestal, it goes into the adjacent inventories BEFORE the harvest rod, so I'm curious how it handles actual wheat.

When I was using the rod to auto-harvest and plant carrots in a setup it was fine, but it's possible that having multiple different types of crops that are trying to be planted could interfere, or when an item tries to be inserted that's not a proper seedling or bone meal. Just a hunch.

commented

Re: your question on wheat - it won't insert the wheat in the rod because the rod won't accept it as it can only accept seeds. the fortune coin (or actually the pedestal) inserts items in a specified order - down, up, north, south, west, east so you likely had your inventories in a position that was earlier in this list than pedestal with harvest rod.

I don't think that it's likely it failed on an itemstack that can't fit in harvest rod given where it crashed. Somehow at the moment it doesn't add the information about the stack and then it fails when it finds out that it has some stuff in slots where there's supposed to be nothing. But debugging it and reading through code I can't see how this would even be possible.

commented

I don't know what to do, honestly. I haven't tested with it extensively enough to have it happen again thus far, and I don't any longer have access to the exact same setup I was using the first time it happened, either.

commented

I am closing this for now as unable to recreate and I also haven't seen other reports of this issue. Let me know in case you would be able to recreate the issue