Occultism

Occultism

19M Downloads

Client-Server crash satchel

DonorKrovi opened this issue ยท 11 comments

commented

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
1.

Player on the server filled the bag to about 70% and then dropped it, and now they can't log in to the server.

The player explained the situation like this:

"I overloaded the bag with items, and now it won't open. If I try to throw it out, it crashes."
^
Crash is an exaggeration because they were simply disconnected from the server

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image
image

System (please complete the following information):

  • Occultism Version: occultism-1.20.1-1.89.1
  • OS: [e.g. Windows] unbuntu 20
  • Minecraft Version: 1.20.1
  • Modpack Link and Version, or list of mods:

Additional context
Console error: https://mclo.gs/o6XHY8c
Player log: https://mclo.gs/uXqLrAX

commented

UPD:
You can't open the bag on the server, but you can open an empty bag. The player was putting shulker boxes and other items in the bag.

commented

This error console for open bag:
https://mclo.gs/ylKWp0B

commented

I don't think this can be fixed, vanilla has a maximum amount of NBT that it can handle and that bag seems to have exceeded it

commented

I don't think this can be fixed, vanilla has a maximum amount of NBT that it can handle and that bag seems to have exceeded it

Why, then, do we need this item in fashion if it can nullify all progress at any moment?

commented

This can affect any item that can contain other containers. What can be done is to block known container items such as shulker boxes, but if you fill the satchel with other items with lots of NBT (such as looted weapons and armor) you can also hit that limit.
An NBT editor can fix it serverside once it happened, but to prevent it is hard, because the max nbt per item is a vanilla limit that cannot be extended

commented

To update this: I am going to try one thing but not sure if it will work. Basically I will disable sending nbt from server to client for this item. It will disable mods that try to display info about container items on the client side, but it might actually work around that limit

commented

@DonorKrovi I implemented the change mentioned above. Please let me know if that fixes the issue (and if satchels otherwise work as intended!)

Please note that this only affects the networking side of things. If players add so much NBT into the item that the server cannot handle it it will still cause issues

commented

@DonorKrovi I implemented the change mentioned above. Please let me know if that fixes the issue (and if satchels otherwise work as intended!)

Please note that this only affects the networking side of things. If players add so much NBT into the item that the server cannot handle it it will still cause issues

https://mclo.gs/LRNS2wk
When I try to interact with bag, I notice a lot of flooding in the server console, but I can't open it, I don't think anything has changed

commented

@DonorKrovi do both server and client have the latest occultism version?

As I said I cannot guarantee that the fix actually fixes it as there's a lot of vanilla limits involved.

As I read this though I think I see the problem and I don't think I can sidestep it. The NBT is being sent when the bag is being opened. I suspect MC, when opening an inventory, just sends all the items in there in one large bulk.

To "save" this bag someone would have to open it in an nbt editor and delete some of the items with lots of nbt of their own

commented

Yes, however, I asked the player to do it again, but on the newly created bag, no problems have been reported yet, but the old one that was created on the old version did not open.

commented

It is possible that some quirk of how vanilla works (namely, some sort of client side caching) causes this.
I suspect it should still happen even to a new bag once he adds too much nbt, but it has to be a lot.