Author Topic: [fixed] 3.9.1+git4634.1bd772a, Linux x86_64: Player name "AI1" on "reload last game"  (Read 790 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
I've been trying to hunt this one down for a while, now (by accident) I finally found a way to reproduce it reliably (I think)...

1. Host a network game with the standard default setup (in my case this was a published game, not sure this matters)
2. Have a client connect to the game
3. Having the below $UserData_Root/lastCustomGameSettings.mgg file in place, hit "reload last game"

You end up loosing your player name. When you type something in chat you show up as "AI1". This should not happen, restoring last games' settings should never overwrite the names of connected human and network players.

It is possible to work around this by switching to a different slot and back.

Code: (lastCustomGameSettings.mgg) [Select]
Description=Six Swamp Of Sorrow
MapFilterIndex=6
Map=six_swamp_of_sorrow
Tileset=evergreen
TechTree=megapack
DefaultUnits=1
DefaultResources=1
DefaultVictoryConditions=1
FogOfWar=1
AdvancedIndex=0
AllowObservers=0
FlagTypes1=0
EnableObserverModeAtEndGame=1
AiAcceptSwitchTeamPercentChance=30
FallbackCpuMultiplier=5
PathFinderType=0
EnableServerControlledAI=1
NetworkFramePeriod=20
NetworkPauseGameForLaggedClients=0
FactionThisFactionIndex=1
FactionCount=6
NetworkAllowNativeLanguageTechtree=0
FactionControlForIndex0=2
ResourceMultiplierIndex0=5
FactionTeamForIndex0=0
FactionStartLocationForIndex0=0
FactionTypeNameForIndex0=persian
FactionPlayerNameForIndex0=AI1
FactionPlayerUUIDForIndex0=
FactionControlForIndex1=7
ResourceMultiplierIndex1=5
FactionTeamForIndex1=0
FactionStartLocationForIndex1=1
FactionTypeNameForIndex1=norsemen
FactionPlayerNameForIndex1=First Player
FactionPlayerUUIDForIndex1=11111111-1111-1111-1111-11111111111
FactionControlForIndex2=5
ResourceMultiplierIndex2=5
FactionTeamForIndex2=0
FactionStartLocationForIndex2=2
FactionTypeNameForIndex2=romans
FactionPlayerNameForIndex2=Second Player
FactionPlayerUUIDForIndex2=22222222-2222-2222-2222-222222222222
FactionControlForIndex3=3
ResourceMultiplierIndex3=10
FactionTeamForIndex3=1
FactionStartLocationForIndex3=3
FactionTypeNameForIndex3=norsemen
FactionPlayerNameForIndex3=AI2
FactionPlayerUUIDForIndex3=
FactionControlForIndex4=2
ResourceMultiplierIndex4=5
FactionTeamForIndex4=1
FactionStartLocationForIndex4=4
FactionTypeNameForIndex4=persian
FactionPlayerNameForIndex4=AI3
FactionPlayerUUIDForIndex4=
FactionControlForIndex5=2
ResourceMultiplierIndex5=5
FactionTeamForIndex5=1
FactionStartLocationForIndex5=5
FactionTypeNameForIndex5=romans
FactionPlayerNameForIndex5=AI4
FactionPlayerUUIDForIndex5=
FactionControlForIndex6=0
ResourceMultiplierIndex6=5
FactionTeamForIndex6=0
FactionStartLocationForIndex6=6
FactionTypeNameForIndex6=tech
FactionPlayerNameForIndex6=Closed
FactionPlayerUUIDForIndex6=
FactionControlForIndex7=0
ResourceMultiplierIndex7=5
FactionTeamForIndex7=0
FactionStartLocationForIndex7=7
FactionTypeNameForIndex7=*Random*
FactionPlayerNameForIndex7=Closed
FactionPlayerUUIDForIndex7=
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
Please try if my fix worked on this bug using git HEAD.

Thanks

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Sadly, it did not. Are you not able to reproduce it anymore?
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
Should be fixed properly now, sorry about that.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
This is fixed for me now, thanks.

However, I assume as a side effect, there is now another issue, which can be reproduced as follows:

1. Place this custom game settings file (which, despite redacted UUIDs, was created in a normal game) in ~/.megaglest/:
Code: (lastcustomgamesettings.mgg) [Select]
Description=Six Swamp Of Sorrow
MapFilterIndex=6
Map=six_swamp_of_sorrow
Tileset=desert2
TechTree=megapack
DefaultUnits=1
DefaultResources=1
DefaultVictoryConditions=1
FogOfWar=1
AdvancedIndex=0
AllowObservers=0
FlagTypes1=0
EnableObserverModeAtEndGame=1
AiAcceptSwitchTeamPercentChance=30
FallbackCpuMultiplier=5
PathFinderType=0
EnableServerControlledAI=1
NetworkFramePeriod=20
NetworkPauseGameForLaggedClients=0
FactionThisFactionIndex=1
FactionCount=6
NetworkAllowNativeLanguageTechtree=0
FactionControlForIndex0=5
ResourceMultiplierIndex0=5
FactionTeamForIndex0=0
FactionStartLocationForIndex0=0
FactionTypeNameForIndex0=romans
FactionPlayerNameForIndex0=Derek
FactionPlayerUUIDForIndex0=11111111-1111-1111-1111-111111111111
FactionControlForIndex1=7
ResourceMultiplierIndex1=5
FactionTeamForIndex1=0
FactionStartLocationForIndex1=1
FactionTypeNameForIndex1=norsemen
FactionPlayerNameForIndex1=tomr
FactionPlayerUUIDForIndex1=22222222-2222-2222-2222-222222222222
FactionControlForIndex2=5
ResourceMultiplierIndex2=5
FactionTeamForIndex2=0
FactionStartLocationForIndex2=2
FactionTypeNameForIndex2=romans
FactionPlayerNameForIndex2=typedef
FactionPlayerUUIDForIndex2=33333333-3333-3333-3333-333333333333
FactionControlForIndex3=3
ResourceMultiplierIndex3=10
FactionTeamForIndex3=1
FactionStartLocationForIndex3=3
FactionTypeNameForIndex3=norsemen
FactionPlayerNameForIndex3=AI1
FactionPlayerUUIDForIndex3=
FactionControlForIndex4=4
ResourceMultiplierIndex4=20
FactionTeamForIndex4=1
FactionStartLocationForIndex4=4
FactionTypeNameForIndex4=persian
FactionPlayerNameForIndex4=AI2
FactionPlayerUUIDForIndex4=
FactionControlForIndex5=4
ResourceMultiplierIndex5=20
FactionTeamForIndex5=1
FactionStartLocationForIndex5=5
FactionTypeNameForIndex5=romans
FactionPlayerNameForIndex5=AI3
FactionPlayerUUIDForIndex5=
FactionControlForIndex6=0
ResourceMultiplierIndex6=5
FactionTeamForIndex6=0
FactionStartLocationForIndex6=6
FactionTypeNameForIndex6=tech
FactionPlayerNameForIndex6=Closed
FactionPlayerUUIDForIndex6=
FactionControlForIndex7=0
ResourceMultiplierIndex7=5
FactionTeamForIndex7=0
FactionStartLocationForIndex7=7
FactionTypeNameForIndex7=*Random*
FactionPlayerNameForIndex7=Closed
FactionPlayerUUIDForIndex7=

2. Host an Internet game

3. Click on "reload last settings"

What I get then is that both the first and second slot is in use by a player named "tomr" (my player name), however, no other player has connected. This happens both before and after the masterserver connects to check, so doesn't seem to be related to the verification
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
This additional test case should now be also fixed.

Thanks

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Thanks, this second issue is now [fixed].

However, I'm afraid we need to revisit the first. I can still reproduce this as follows:

1. Host an Internet game with the standard default setup (in my case this was a published game, not sure this matters)
2. In a separate terminal, type: nc -vv 127.0.0.1 61357 to simulate a connecting client
3. Having the above (first post on this topic) $UserData_Root/lastCustomGameSettings.mgg file in place, hit "reload last game"

You end up loosing your player name. When you type something in chat you show up as "AI1". It is possible to work around this by switching to a different slot and back
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
Hoping this is fixed now in git.

 

anything