Author Topic: [fixed] 3.7.0-beta1: OoS if human player disconnects before game has ended  (Read 739 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Today I was hosting on my own computer using a 3.7.0 beta1 headless server, installed using the Linux 64 bit installer. To not reuse the same binary + data, I used the build in my SVN working directory, a full rebuild (rm -rf build/) of r3667, for a client, and connected with --connect=127.0.0.1. The other player was ArielSantos from Brazil. We were pllaying on a 128x128 6 player map, against 3 CPUs.

Code: [Select]
megaglest v3.7.0-beta1
Compiled using: GNUC: 40603 [64bit] on: Oct  7 2012 19:47:53
SVN: [Rev: 3667] - using STREFLOP [SSE] - [no-denormals]
Connecting to host [127.0.0.1] using port: 61357
[2012-10-08 22:44:51] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/commander.cpp::buildCommand Line: 1086]
Can not find command type for network command = [networkCommandType = 0
unitId = 500104
commandTypeId = 2
positionX = 225
positionY = 115
unitTypeId = 23
targetId = 0
wantQueue= 0
fromFactionIndex = 0
unitFactionUnitCount = 57
unitFactionIndex = 5, commandStateType = 0, commandStateValue = -1, unitCommandGroupId = -1]
Commands:  id = 0 id = 1
for unit = 500104
[cow]
[

HP: 500/500
Armor: 0 (organic)
Sight: 10
Produce: 12 food
move]
actual local factionIndex = 5.
Unit Type Info:
[Unit Name: [cow] id = 7 maxHp = 500 hpRegeneration = 0 maxEp = 0 epRegeneration = 0 maxUnitCount = 0 fields index = 0 value = 1 fields index = 1 value = 0 properties index = 0 value = 0 properties index = 1 value = 0 armor = 0 armorType Name: [organic id = 0 light = 0 lightColor = x [0] y [0] z [0] multiSelect = 1 sight = 10 size = 1 height = 1 rotatedBuildPos = 0.00 rotationAllowed = 1 skillTypes: [3] i = 0 Stop i = 1 Move i = 2 Die commandTypes: [2] i = 0 Stop i = 1 Move storedResources: [0] levels: [0] meetingPoint = 0 countInVictoryConditions = 0]
Network unit type:
[turtle_formation]
Game out of synch.
[2012-10-08 22:44:52] *ERROR* In [game.cpp::update Line: 1758] Error [Error [#3]: Game is out of sync, please check log files for details.]

And another game: same setup, but an 8 player map with with Nig from Germany and 6 CPU players:
Code: [Select]
megaglest v3.7.0-beta1
Compiled using: GNUC: 40603 [64bit] on: Oct  7 2012 19:47:53
SVN: [Rev: 3667] - using STREFLOP [SSE] - [no-denormals]
Connecting to host [127.0.0.1] using port: 61357
[2012-10-09 01:27:33] *ERROR* In [/home/tomreyn/SCM/megaglest-trunk/source/glest_game/game/commander.cpp::buildCommand Line: 1086]
Can not find command type for network command = [networkCommandType = 0
unitId = 100135
commandTypeId = 2
positionX = 178
positionY = 146
unitTypeId = 15
targetId = 0
wantQueue= 0
fromFactionIndex = 0
unitFactionUnitCount = 136
unitFactionIndex = 1, commandStateType = 0, commandStateValue = -1, unitCommandGroupId = -1]
Commands:  id = 0
for unit = 100135
[thortotem]
[

HP: 301/3000
Armor: 20 (wood)
Sight: 16]
actual local factionIndex = 1.
Unit Type Info:
[Unit Name: [thortotem] id = 20 maxHp = 3000 hpRegeneration = 0 maxEp = 0 epRegeneration = 0 maxUnitCount = 0 fields index = 0 value = 1 fields index = 1 value = 0 properties index = 0 value = 0 properties index = 1 value = 0 armor = 20 armorType Name: [wood id = 2 light = 0 lightColor = x [0] y [0] z [0] multiSelect = 0 sight = 16 size = 2 height = 6 rotatedBuildPos = 0.00 rotationAllowed = 1 skillTypes: [4] i = 0 Stop i = 1 Morph i = 2 Be built i = 3 Die commandTypes: [1] i = 0 Morph storedResources: [0] levels: [0] meetingPoint = 0 countInVictoryConditions = 0]
Network unit type:
[spearman]
Game out of synch.
[2012-10-09 01:27:34] *ERROR* In [game.cpp::update Line: 1758] Error [Error [#3]: Game is out of sync, please check log files for details.]

I assume this is triggered by clicking around on the mini map, since I think I've done this both times when we ran into OoS.

Edit:
I forgot to provide some possibly important details. During both games I ran into an out of synch, but I'm not sure the other end actually had one, too. In fact, for the second game with Nig (he's on Windows 7) he ran into this error...
Code: [Select]
[2012-10-09 01:26:48] Runtime Error information:
======================================================
Unknown error!
Stack Trace:
00000000 00000000 00000000 67bc3ba2 ZwGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 67bc3ba2 ZwGetContextThread!ntdll (null)(0) +18
... and I was just told that he had quit, and less than a minute later I got my OoS. So this OoS may actually be triggered by other errors. Nig also told me that he occasionally ran into the same "unknown error"'s in 3.6.0.3, so this may not actually be an issue in 3.7.0 beta1 (nor in MegaGlest at all). Still, the following OoS should not occur.
« Last Edit: 15 October 2012, 14:58:19 by softcoder »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.7.0-beta1: OoS while moving camera
« Reply #1 on: 9 October 2012, 04:49:25 »
To properly debug this, all participants (including server) should set this in the glestuser.ini:

DebugLogFileWorldSynch=debugWorldSynch.log
DebugWorldSynch=true

Then play a game, if you get an out of synch, get each player to 7z their debugWorldSynch.log and link the logs. Doing a diff on each players copy of the logs will likely point out the source of the out of synch.

Thanks

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: 3.7.0-beta1: OoS while moving camera
« Reply #2 on: 9 October 2012, 22:24:18 »
 Out of sync of headless server: http://www.titusgames.de/debuglogs.7z
( I had no general debug enabled so I don't know how much sense makes "debug.log" ). The others should be ok!
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.7.0-beta1: OoS while moving camera
« Reply #3 on: 10 October 2012, 00:37:36 »
We discovered that out of synch's will happen for sure if a human player disconnects before the game has ended. We have corrected this bug in svn and will determine how / when to produce a new beta.

Thanks

 

anything