halflife icon indicating copy to clipboard operation
halflife copied to clipboard

Major normal download issues

Open Freeman-51 opened this issue 13 years ago • 12 comments

Here, i will talk about normal download issues : the case were files are not on a fast download url, or the other case were there is no fast download at all.

We are just talking about download from the server, fast download work well for this issue and can "workaround" it.

This issue touch some specific files at least thoses 2 : wad files (precached from .res) css files

Recently, i discovered that .css files precached from plugins are touched too when i installed warcraft 3ft mod. (popular mod) http://wc3mods.net/forums/viewtopic.php?f=2&t=3498 wc3.css is needed for motd style and so on.

what the issue does ? Freeze the game (need a manual shutdown) at download end of the file. Create a blank folder of the name of the downloaded file in cstrike_downloads (client corruption for this file, ex: if it's a wad, client will never be able to go on that map in any server because of this bugged folder).

Also .css files loose functionnality if not in cstrike folder. (mean they don't work in cstrike_download) when they worked before with 2009 build. So warcraft motd is now permanently broken.

Please, fix this.

Freeman-51 avatar Nov 26 '13 08:11 Freeman-51

am i the only one experiencing this bug ?

Freeman-51 avatar Dec 23 '13 11:12 Freeman-51

No, your not. I have a CS server that worked fine till Steam changed to the 'download' folder setup. Now none of my .wad files download to clients..... just leaves a blank folder with wad name. I've even tried rebuilding my .res files with Resgen. I've went as far to start out fresh using Steam CMD (proto 48 / ver 6132 / cs ver 1.1.2.7) I do not have web-space for fast download, so I rely on just my server to download everything to my clients. I've been blowing the internet up looking for a fix. No luck yet. I'll let you know if I find anything.......

BeerslamR avatar Jan 01 '14 14:01 BeerslamR

This should be flagged as high priority, because it the same kind of issue... https://github.com/ValveSoftware/halflife/issues/234

Freeman-51 avatar Feb 14 '14 23:02 Freeman-51

That bug is in Netchan_CopyFileFragments function. Engine use COM_CreatePath function to create directory for download file (in old builds):

void COM_CreatePath(char *pszPath) {
    char *pszOfs;
    char chOld;

    for (pszOfs = pszPath + 1; *pszOfs; pszOfs++) {
        if (*pszOfs == '/' || chOld == '\\') {
            chOld = *pszOfs;
            *pszOfs = '\0';
            FS_CreateDirHierarchy(pszPath, NULL);
            *pszOfs = chOld;
        }
    }
}

In new builds engine use this code:

pchLastSlash = strrchr(szFileName, '\\');
if (pchLastSlash) {
    *pchLastSlash = '\0';
}
FS_CreateDirHierarchy(szFileName, "GAMEDOWNLOAD");

In my opinion correct code is:

pchLastSlash = strrchr(szFileName, '\\');
if (pchLastSlash) {
    *pchLastSlash = '\0';
    FS_CreateDirHierarchy(szFileName, "GAMEDOWNLOAD");
}

I made simple patcher to fix bug (tested on 6153 build), you can download it here (copy .asi file in your Half-Life directory)

WPMGPRoSToTeMa avatar Jun 11 '14 03:06 WPMGPRoSToTeMa

Your link doesn't work. Where did you get that part of code ? i searched on this repository and i didn't find it.

Freeman-51 avatar Jun 12 '14 09:06 Freeman-51

That is decompiled code.

You can download patcher here https://forums.alliedmods.net/showpost.php?p=2150391&postcount=22

WPMGPRoSToTeMa avatar Jun 12 '14 12:06 WPMGPRoSToTeMa

Having the same issue with .wad files in Team Fortress Classic. The game crashes after completing a .wad download. If I start the game again and try to connect, the game will again crash due to a file read error.

kriswema avatar Jan 02 '16 01:01 kriswema

Hello, this issue is happening to in the latest build of Half-Life. The file is proxboctwadpak.wad BUILD 7561 SERVER imagen

rtxa avatar May 07 '18 04:05 rtxa

@rtxa this is client-side problem, but it only appears if the server doesn't use FastDL.

WPMGPRoSToTeMa avatar May 07 '18 14:05 WPMGPRoSToTeMa

@WPMGPRoSToTeMa yes, I was having problems with the fastdl yesterday, today I upload it and it works, however the problem is when fastdl is not used...

rtxa avatar May 07 '18 16:05 rtxa

@kisak-valve This issue has been fixed, the code in the engine now works like @WPMGPRoSToTeMa suggested.

I don't know which update fixed this though. Ideally somebody should search through the internal commit log to match this up since i can't find the change listed in any update news.

This issue was a duplicate of #160 and #1026, and #1526 and #2015 are known duplicates as well.

Unless somebody still experiences issues downloading WAD files all of these issues should be closed.

#1551 refers to this issue but may also cover another problem that needs to be tested again.

It's possible that the crash referred to there and the freeze referred to by this issue are the same thing, caused by code trying to open a directory as a file and then either freezing or crashing when a read operation is performed on it. In that case the issue should be fixed.

SamVanheer avatar May 04 '19 15:05 SamVanheer

Closing per the last comment.

kisak-valve avatar Jun 07 '19 13:06 kisak-valve