Standalone Multiplayer Duplication Bug

KryptonIon

Terrarian
The bug is hard to replicate with a local server since it requires a bit of lag. It is replicable anywhere and at any time. First, Quick Stack to nearby chests, then quickly sort the inventory as fast as possible. Note that, before duping, transfer the items to the 3rd or 4th row.



I think the bug is caused by Quick Stack waiting for a response from the server, which freezes the inventory.
 
Last edited:
Since you mentioned that you're using tShock, I've moved the thread to the modded section.
 
Update: I'm unable to get video footage but, this bug should exist in Vanilla.

The process behind it is:
Quick Stack is sent to the server. Quick Stack also freezes inventory client-side
Lag provides the necessary time(~200-300ms for maximum success)
Sort Inventory shifts the inventory
The client receives Quick Stack update
Items are duplicated

The Quick Stack update doesn't shift the inventory around but sets its contents. Thus, "renewing" its items but keeping the content the same.
This also leads to another bug: Item Modifications(Packet 88, Tweak Item) are purged. Also, it only sets the slots that have items. And since Quick Stack happens first, at the time of processing, the server is still unaware of the sort, so it doesn't purge those slots, hence dupe bug.

The code necessary for this bug exists in the vanilla client.

Edit: Added more information on Quick Stack
 
Back
Top Bottom