Roots

Roots

24M Downloads

Client disconnect when sorting a chest with Quark

nyanlathotep opened this issue ยท 3 comments

commented

General Information

Describe the bug:
On servers only (have tested dedicated but not LAN), an exception is thrown and the client is disconnected when attempting to sort a chest with at least two life essences (they don't seem to need to be different in any way). The exception only appears in the server log from what I can see. It seems to be that the life essence is calling sided internationalization code in its display name function, which fails on the server. There's also some visual desync where the inventory looks sorted to the client before disconnecting, but it isn't after reconnecting.

To Reproduce:

  1. On a dedicated server, produce at least two life essences with runic shears and place them in a chest.
  2. Sort the chest with quark's inventory-sorting feature.

Expected behavior:
Not a crash, and ideally for the inventory to sort.


Environment Versions

Mystic Mods Versions

  • MysticalLib: 1.12.2-1.7.0
  • Mystical World: 1.12.2-1.8.4
  • Roots: 1.12.2-3.0.30

Other Versions:

  • Conflicting mod: Quark r1.6-179 and AutoRegLib 1.3-32
  • Forge: 14.23.5.2854
  • Minecraft: 1.12.2

Logging Information

Latest Log (serverside):
https://hastebin.com/orijomurul.md

commented

The problem here is that getItemStackDisplayName relies on the i18n translation... which doesn't exist on the server... but the function is called on both sides, which is hideously inefficient. At some point in time I fixed up the deprecated calls to the old i18n library (which does exist on the server) to the new one. Will fix.

Although that still feels weird on Quark's side I know how freaky they are about updating anything 1.12 related.

commented

It is odd, and I noticed they removed display name from the function in 1.15 compared to 1.12, so perhaps it was to account for edge cases like this.

I got curious if I could replicate it with something else that would look up display names server-side like an OpenComputers inventory query, and that returned null for the label field, but it didn't crash or anything.

commented

Yeah, display names technically aren't meant to exist on the server-side.