[0.11.6][kovarex] win xp 32 bits + win 7 64 bits desync

This subforum contains all the issues which we already resolved.
Gandorio
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Dec 12, 2014 9:17 pm
Contact:

[0.11.6][kovarex] win xp 32 bits + win 7 64 bits desync

Post by Gandorio »

Hello, I'd like to report a bug I've found while playing.

Situation - I'm hosting a server on windows 7 x64 while a friend is joining on windows xp x86 (he might not have the latest service packs etc from windows update if that matters).
The problem - If any of us gets hit by enemies, the game will instantly lose sync, and will keep losing sync for each hit we take so we're basically forced to close the game. We only tested this on the enemy base to the right of our base (save below).

I tested both the normal installed x64 version, standalone x64 and the standalone x86 versions.

This bug DID NOT occur when I was hosting/playing on the x86 version (so both me and my friend had the x86 one)

Save is here: https://www.dropbox.com/s/84j0by2yqfelc ... e.zip?dl=0
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.6] win xp 32 bits + win 7 64 bits desync

Post by kovarex »

Thank you for the precise description.
Can you tell the guy on with the winxp, to try to run the tests (the batch file located in the install folder)?

If it gives error, it should put some files into the <user write folder (the one where saves are>/dumps, in that case I would be interested in contents of the folder :)
Gandorio
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Dec 12, 2014 9:17 pm
Contact:

Re: [0.11.6] win xp 32 bits + win 7 64 bits desync

Post by Gandorio »

It did give an error, here is the dump:

https://www.dropbox.com/s/vvpyvi8v1zu46 ... s.rar?dl=0
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.6] win xp 32 bits + win 7 64 bits desync

Post by kovarex »

Thanks for the report and the file. To my surprise, I found out I'm able to reproduce the exact same problem on my machine from the 32 bit binary, I just didn't try it, silly me.

So I'm just trying to find out where the problem is ...
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.6][kovarex] win xp 32 bits + win 7 64 bits desync

Post by kovarex »

Hmm, so the problem is fixed, but the way it was fixed really really doesn't make me happy.

Code: Select all

float EntityWithHealth::getHealth() const
{
  /** For anyone who could be wondering why am I first putting the simple multiplication result
   * into float variable and returning the variable instead of returning directly the expression:
   *
   * The reason is magic.
   * Once I return the expression, the results for 32bit architecture are different than those
   * on 64bit architecture. This is really strange as there are plenty of other places where the floats and doubles
   * are used in various ways, but this is the only one where this kind of problem appeared.
   * P.S Yes, I have the fp strict mode enabled.*/
  float result = this->health * this->getPrototype()->maxHealth;
  return result;
}
Post Reply

Return to “Resolved Problems and Bugs”