Join Error: Failed to Load Map

Hello, I'm investigating the error that people fail to join because CS2D fails to load the map.

This is one of the biggest bugs that I urgently want to fix before releasing the next update.
Unfortunately since this is a network and transmission related bug it's really annoying to test and reproduce.

Perhaps the error occurs like this: The player connects to the server, downloads files, and clicked cancel (disconnected from the server at the time of download). It was a lot of times, on different servers.

I mentioned this bug once in the bug thread. I didnt know at this moment, that there was a newer server than the one i was using at the moment, probably because the update was silent but important (the version number didnt change, but i saw the difference when I compared the size of the file) The failed to load map error was really heavy,(While playing, you were able to see that players are trying to connect several times, but never join the game) but after updating the server the error was vanished. Since then i did never met the error again.
So if people are mentioning this error, they probably try to acess a server with this "old" file or/and the server host doesnt even know that there is an update, as his file has also the newest version number.

But to prevent corrupt/deprecated files, a size compare of the existing with the servers files wouldnt be bad i think.

It happens most of the time when you limit your download size to a size where the map is bigger.
For example, if the map's size is 153KB, and you limit to 50kb, the map won't be downloaded.
Since CS2D mostly locks the size at 250kb by default, the maps that are greater than 250kb in size (e.g 300kb or something) won't be downloaded, therefore players cannot join.
^^Same thing with tiles.

Also another two bugs I've been in contact with (addressing maps and tiles):
If you limit the download thing to Images only, the tiles will be downloaded but the map won't.
And if you limit it to Sounds only, both the tiles and maps won't be downloaded, no matter what.

And also if you set the downloads to none, and you join a server where map differs, you can,not,download,the,map,no,matter,what.
Take "download temporary file" as an example, an error would be "cannot load maps/temp.map!"
As for the overwrite option, it will choose not to overwrite, but to play the map YOU have.
So for example if the map is completely different, you still play that map but bugs concerning tiles and dynamic walls happen.

These are all the bugs I believe to be concerning maps and tiles. (Which I personally encountered/tested)

Okay, I still have trouble reproducing the issue
I was able to reproduce the overwrite bug though (which is a quite bad one!).

@ CS Varna d-_-b: Actually everywhere in the code there is special handling for files which are part of the map (map, tiles, background, briefing). So the transfer should work, no matter which size they have or which transfer options are used.

Test 1: Sounds only
I just hosted a server and tried to join with a client which did not have the map + tileset. I changed the client setting to transfer sounds only beforehand. Transfer and joining worked fine. Also worked with only the map or only the tileset missing

Test 2: Max 50 kb
I did the same as above but set the transfer setting to max 50 kb. I hosted de_aztec and removed gfx/tiles/default_aztec.png (~75 kb) on client side. Transfer and joining worked fine.

Test 3: Altered map, No Download, Temp Option
I joined a server with a client which had a modified map (just some tiles changed). Difference was detected and option dialog displayed Temp option worked

Test 3: Altered map, No Download, Overwrite Option
I joined a server with a client which had a modified map (just some tiles changed). Difference was detected and option dialog displayed Overwrite option resulted in simply joining the server and using the LOCAL map version WITHOUT download the server variant at all.

The overwrite issue is very critical. I didn't get the failed to load map bug in any test though.

Maybe Edik is right and the issue doesn't even exist anymore with the latest server version which has been released shortly AFTER the last version update.

What I already updated though is that in the next version servers will receive the reason why a client failed to load the map. This might help to debug the issue in case it still occurs.

Maybe it occurs only on HTTP transfer servers? I'm not sure about this but I've encountered it on various servers (both http and listen servers).
I could probably try to reproduce the bug but can't do it alone though

Have you tested HTTP transfer yet? It's the most common problem when trying to join servers.

You could probably try this by uploading the map cricital files (.map + tile) and attempt to join according to the net limit thing (e.g sounds only)
Off-Topic:
HTTP downloading causes massive fps drops (at least for me though), so servers with over 100 files on http will freeze the CS2D Process completely therefore unable to join.

EDIT:
I just reproduced a bug regarding maps.
Here are the steps I've done: I've opened a server in a completely separate CS2D folder using de_dust2 map. I've launched a separate CS2D with an altered de_dust2 map, and disabled downloads completely through options. I tried to join the server I made, and chose to save as temporary. Undoubtedly, it didn't work due to this error:

(oddly a black "thing" appears under screenshots while in directx, also a white background)

Yes, HTTP transfer is a very crappy feature and I highly recommend to not use it at all. I won't be able to improve that.

Edit:
Thanks a lot for testing, CS Varna d-_-b. I tested the very same way (2 folders and join via 127.0.0.1). There already are a few changes in my version (compared to the current live version) so I assume that this particular bug has already been fixed.

So the way this went is extremely odd. I started a CS2D dedicated server in a completely separated folder with the map "de_dust2" This time I went into the other CS2D separated game and renamed "as_mars.map" into "temp.map" I went in-game, disabled downloads completely, and tried to join...
And guess what? It loaded the one temp.map (which is as_mars, but renamed) instead of replacing it!
Well, this has to be fixed.

Basically, without an existing temp.map, it will say that the map doesn't exist.

But the CS2D will join even if the temp.map doesn't even match the current server map (Just like the test I've did)

If you try this with 1.0.0.7 p2 (the current released one) and do exactly the same thing (exactly as_mars), you will spawn outside of the map (in a dark place in the middle of nowhere). If you do with another maps with same positions the server-side spawnpoints has, you will spawn on the exact same position (no matter what tile it is, a wall or a walkable one).

Edit: You're welcome. It's my pleasure to help with everything I possibly could since this has been my childhood game for around 10 years

@ DC: It could happen too even if the players didn't completely disable downloads.
For starters, CS2D by default limits it to 250kb, so for maps that are higher than 250kb, it would be impossible for both temp and overwrite.

I Make files Tiles in Server Transfer I do not see any problems after that I think the mistake comes from Downloade Or treansfer like he said @ LiME1516:

Quote:

Perhaps the error occurs like this: The player connects to the server, downloads files, and clicked cancel (disconnected from the server at the time of download). It was a lot of times, on different servers.