Shipnames mismatch in multiplayer

Bug #1800338 reported by Toni Förster
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

Multiplayer seafaring maps desync because the name of the first ship build is different on every client:

Client 1:

MO(17845,barbarians_ship): New ship: Hnoss

Client 2:

MO(17845,barbarians_ship): New ship: Volf

Part of this bugreport:
https://bugs.launchpad.net/widelands/+bug/1797549/
https://bugs.launchpad.net/widelands/+bug/1797549/comments/17

Related branches

GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
tags: added: desync multiplayer tribes
Revision history for this message
GunChleoc (gunchleoc) wrote :

Good catch!

pick_shipname() is already using game.logic_rand(), which is the correct random function.

We could try using a new playercommand in EditorGameBase::create_ship to see if that helps.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: New → In Progress
Revision history for this message
GunChleoc (gunchleoc) wrote :

I'm getting desyncs on the same machine if I compile 1 branch with GCC and the other with Clang. So, I guess we have a cross-platform/cross-compiler issue here. I'll look into the random number generator and floating point numbers.

Revision history for this message
GunChleoc (gunchleoc) wrote :

This savegame will desync with gcc vs. clang even before the ship finished building

Revision history for this message
Toni Förster (stonerl) wrote :

That would explain why we had desyncs on a very big non seafaring maps. According to your changes in the linked branch; due to some mismatching floating point numbers, that are caused by usage of different compilers etc, it might be likely that a tree grows on one client but not on the other. Which then would be cut by a woodcutter and result in a log being present on one, but not on the other computer. Is this correct?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Yes, this is a correct assumption to make.

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.