Author Topic: [Fixed] r4497: Checksum cache not refreshed when mod moved to global  (Read 605 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
The Desert4 tileset was recently moved from OS user specific UserData_Root to the global storage location. However, doing this seems to change the checksum (why?), and the old checksum was not removed.

We were able to verify this as follows:

Yesterday when I started MegaGlest, the Desert4 tileset I had in UserData_Root was automatically renamed to desert4_custom.

Test 1:
I was hosting a game with Desert4 set, Titi and two of his sons were connected to my server. The server reported that Titi's tileset did not match, however, for his two sons, there was no such message (i.e. same tileset as the server). Titi then cleared out his checksum cache, restarted MegaGlest and reconnected to the server, but the message was repeated - according to the server he still had a different tileset. He restarted MG and connected to the server again with the same effect.

Titi said he did not modify his copy of the tileset. We checked the XML files' MD5 and they matched between Titi's computer and the server.

Test 2:
So this time I deleted my checksum cache, restarted MG and hosted the same game again, and all the players from the last game connected to my server again. This time, Titi's two sons' clients reported a tileset mismatch on Desert4, while none was reported for Titi.

So it would seem that checksums need to be recalculated when a mod (or maybe just a tileset?) is moved from system user to global system scope.
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 · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,225
    • View Profile
    • http://www.titusgames.de
Re: r4497: Checksum cache not refreshed when mod moved to global
« Reply #1 on: 23 June 2013, 01:55:33 »
In general we have trouble with the checksums very often when playing.  Do we really need the CRC-cache and if yes, can we revalidate/clear it each time we get a possible conflict ?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: r4497: Checksum cache not refreshed when mod moved to global
« Reply #2 on: 23 June 2013, 05:23:38 »
Svn now forces the host to refresh its CRC if any client has a mismatched CRC.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,225
    • View Profile
    • http://www.titusgames.de
Re: r4497: Checksum cache not refreshed when mod moved to global
« Reply #3 on: 23 June 2013, 23:23:05 »
it must not be done now, but is there a way to make the client calculates his checksum again too?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: r4497: Checksum cache not refreshed when mod moved to global
« Reply #4 on: 23 June 2013, 23:27:00 »
Clients recalc after downloading something new. Otherwise updates are done rnadomly every x days or weeks.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r4497: Checksum cache not refreshed when mod moved to global
« Reply #5 on: 24 June 2013, 00:39:09 »
Solely based on logic (not testing, since it's not clear how to create a proper test case) the solution announced in https://forum.megaglest.org/index.php?topic=9130.msg88083#msg88083 should fix the originally discussed issue. [Fixed].
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 · · ·