ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.67k stars 621 forks source link

[TFC Linux] File Read error #2954

Open APGRoboCop opened 4 years ago

APGRoboCop commented 4 years ago

Hello I've noticed that my TFC Linux server crashes due to a File Read Error.

FATAL ERROR (shutting down): File read failure [Inferior 1 (process 21160) exited with code 0377]

Now I had thought it had something to do with the casing of the tfc.WAD or any other resources and maps that contain mixed cases that Linux tends to "hate" or get "muddled" with as Linux Debian is case sensitive.

However, I've found out that removing the halflife.wad file from /tfc folder fixed that issue. I cannot remember if I added the modified halflife.wad file in /tfc server - that contained the textures that work better for my TFC HD Zip. But I believe that wad file should be loaded from /valve folder not /tfc - which may have triggered that crash above.

PS is it possible to update the libstdc++.6.so or remove the outdated libstdc++.6.so file that SteamCMD downloads, which causes my custom Metamod Addons to not load due to the CXXABI.1.3.9 not supported? Even though I had to delete that file myself and allow my HLDS to use the libstdc++.6.so from the /usr/lib/i386-linux-gnu/ folder.

SamVanheer commented 4 years ago

The engine will always load wad files from the current game directory before loading from the default directory (valve) so if you have a custom halflife.wad in /tfc it will load that one first.

The error you're getting will occur if it fails to read either the 12 byte wad file header or any of the 32 byte lump info entries, or if the actual lump data fails to be loaded. This last one depends on the data size listed in the lump info being correct.

If you're getting this error then the custom file may be corrupt.

APGRoboCop commented 4 years ago

There's something else as well, directory suffix glitches. I've noticed that my /hlds folder that contains my TFC server and /tfc folder but when I used ./hlds_run etc it appears to only work and load if I created a /hlds_tfc folder. I've spotted it and realised it from my Webmin on Files and Connections. Without the /hlds_tfc folder along with /hlds separately out of the /hlds_tfc, TFC won't load.

E.g

Using ./hlds_run -game tfc from /home/serv5/steamcmd/hlds ONLY loads the tfc server files and libs from /home/serv5/steamcmd/hlds_tfc for some odd reason. But when I rename the /hlds folder like in old school /hlds_l or any kind of suffix the TFC server loads properly and runs fine.

SamVanheer commented 4 years ago

When it glitches like that what is the output of the gamedir command? It should be tfc.

It's possible that the directory name matching hlds is really the cause. Perhaps there's some code in the engine or even the OS that's interfering there?