Page 1 of 1

[0.11.1][MP] Desync on Item Manipulation

Posted: Mon Nov 10, 2014 11:12 am
by Splitframe
Hi there,

we are currently playing in MP mode with two persons over LAN and internet ( direct IP, not hamachi ).
We are using these PCs to play:

User 1:
MAC OSX Yosemite with Intel Haswell CPU

User 2:
Windows 8.1 with AMD Vishera CPU
Windows 8.1 with Intel Haswell CPU

Both using the x64 build.

First off, it is irrelevant for the desync to appear which one of us hosts the game and if we do it over LAN or WAN.

The desync appeared after around 10h of gameplay, the save file is 20MB we have a lot of biter on the map.
The desync did not appear when we both stood still and didn't manipulate any items.

We seem to get desync when:

- The client picks up an item from the floor.
- The client selects an item from the toolbar/inventory.
- The client crafts an item.

Note that not all Items are affected and the table of affected items seems to change.
One time it was the electric circuit another the copper wire that caused the desync.

Edit: Reference
We have a similarity to this, my friend also died and we have tanks, the desyncs also happened shortly after that.

We tried the following fixes:

- Equalize the thread count on all involved clients.
- Delete the temp folder and crop-cache.dat.
- Restart the whole game client.
- Change who hosts the game.
- Voodoo Magic.

Edit: Possible workaround.

In a new game, when we first had the desync I had just picked up a damage wall, after that nearly every GUI interaction lead
to a desync. After I removed the damaged wall and placed it on the ground the desyncs disappeared again.
That would also explain why some people get the desync loop from battles, their armor gets damaged.

I hope this helps.

Save File

Log File

Re: [0.11.1][MP] Desync on Item Manipulation

Posted: Thu Nov 13, 2014 2:26 pm
by Splitframe
We were now able to play normally, everytime a desync happens we load the last autosave
and try to locate the offending item that causes the desync.
It can be any item in your main inventory that has a "damage bar". One time it was my used metal armor
another time it was a damaged wall.

I hope that helps.

Re: [0.11.1][MP] Desync on Item Manipulation

Posted: Fri Nov 14, 2014 8:58 am
by Mevius
Thanks for the tip! I'll add it to the Wiki!

Re: [0.11.1][MP] Desync on Item Manipulation

Posted: Fri Nov 14, 2014 3:49 pm
by Quis
I think we can narrow "every GUI interaction" to every action which manipulates your inventory (including quickbar/toolbelt).

We had a similar problem and guessed it was due to too many stacks of the same item in the inventory, but it might be related to damaged objects in the inventory but I can't recall whether that was the case anymore.

Re: [0.11.1][MP] Desync on Item Manipulation

Posted: Tue Dec 02, 2014 6:21 pm
by kovarex
Thank you for the report and the save game.

We opened the save "just to be sure that it was already fixed", but it wasn't :)

So the problem is when there is more than one stack of item and some if it is damaged. The inventory sorting algorithm doesn't take the damaged value into consideration, which leads to a problem, because the items aren't same, so different sorting implemenation (mac vs Win) sort it differently.

Long story short, it is now fixed for 0.11.4, and as addition, the damaged items are now sorted from the most damaged to the least damaged.