Page 1 of 1

Map bug - territories not coloured in

Posted: Sun Jan 15, 2023 1:55 pm
by Jamiet99uk
This game recently ended (I was eliminated), but looking at it now, none of the territories are coloured in, they're all the neutral beige colour:

https://www.webdiplomacy.net/board.php?gameID=460619

Is it just me seeing this?

Super weird.

Re: Map bug - territories not coloured in

Posted: Sun Jan 15, 2023 2:09 pm
by gimix
Weird, yes. I opened the game and I see everything beige too

Re: Map bug - territories not coloured in

Posted: Sun Jan 15, 2023 5:19 pm
by MerryBBuck
A rare Swiss victory!

Re: Map bug - territories not coloured in

Posted: Thu Jan 19, 2023 10:59 am
by Jamiet99uk
Any of the devs / admins seen this before?

Re: Map bug - territories not coloured in

Posted: Mon Jan 23, 2023 3:03 am
by A_Tin_Can
I've not seen this before.

When I was working on the code, the maps were saved in a cache when they are generated. My guesses are:

- There was a short-lived map bug that got fixed, but your map was generated during the time the bug was around. I would guess the map generation code was at least touched when the updated map UI was added.
- Maybe this map was generated while a non-atomic update was pushed to the server (eg, one file was updated before another in the same update) causing a super short lived bug / race condition.
- The time this game was drawn hit an edge case where the territories hadn't been updated yet but the unit positions had (I dunno, like maybe the game was already processing at the exact time the draw went through - there are two ways a game might get processed, so this could potentially happen (although I thought there were locks to prevent this)).

Of course, I don't have access to the server to check anymore. I think it's most likely that it was a temporary problem with the map generator, and would be fixed by removing that specific map from the cache (forcing a redraw next time the map was looked at). But it might be a problem with the game history - meaning a redraw would still miss the territory information.

WebDiplomacy was originally a hobby project many years ago, so there are a lot of things from modern apps that it doesn't have (eg, atomic deployments) which might occasionally cause issues like this. TBH even if it wasn't a hobby project, those practices weren't really standard at the time anyway.

I'm still impressed with how well Kestas' work has stood the test of time. His attention to detail and structure in the early days has really paid off.

Re: Map bug - territories not coloured in

Posted: Mon Jan 23, 2023 3:04 am
by A_Tin_Can
I opened the game and I see everything beige too
Everyone gets the same cached map, unless that entry is removed from the cache.