Possible trap on a case sensitive file system

Get some cool tips about how to tweak your UT graphic, gameplay, and much more!
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Possible trap on a case sensitive file system

Post by Barbie »

Recently a map could not be loaded on a Linux system:
ucc.log wrote:Failed import: Class Class cyborg.cyborg (file ../Music/cyborg.umx)
Failed to load 'MH-AS-BioassaultSE': Can't find Class in file 'Class cyborg.cyborg'
Failed to load 'Level None.MyLevel': Can't find Class in file 'Class cyborg.cyborg'
The map does NOT contain the music "cyborg.umx" but contains a Cyborg of package "cyborg.u":
cyborg.jpg
cyborg.jpg (31.21 KiB) Viewed 1351 times
The "cyborg" files of the UT installation are as follows:

Code: Select all

# find -iname "cyborg*"
./Music/cyborg.umx
./System/Cyborg.u
and the search order is as usual in UnrealTournament.ini:
UnrealTournament.ini wrote:[Core.System]
Paths=../System/*.u
Paths=../Maps/*.unr
Paths=../Textures/*.utx
Paths=../Sounds/*.uax
Paths=../Music/*.umx
I guess the following: while opening the map the Actor "cyborg" of package "cyborg" is needed. The engine does a case sensitive search first in above given paths for a file named "cyborg.*" and finds "./Music/cyborg.umx" only. But in that file the class "cyborg" does not exist and the engine spits out the error message above.

If I now rename "Cyborg.u" to "cyborg.u" the map loads fine, because "./System/cyborg.u" is found first.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Possible trap on a case sensitive file system

Post by JackGriffin »

Yeah I can for sure confirm this. Years back it was Herm that showed me this issue and how to fix the redirect so it wouldn't be a problem. I'll be honest that it took a while for me to understand the why part, I just knew that having the alternate case versions on the redirect solved the problem. Is this even possible to fix?
So long, and thanks for all the fish
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Possible trap on a case sensitive file system

Post by sektor2111 »

For those which are agree with me about those "a few maps" that needs fixed, this is one example. N00b admins won't deal here unless map will be correctly set with devs used. For mappers willing to fix it, just load the stupid same-named music in MyLevel - end of problems... or rename it before importing, or exporting using other name and/or using another "cyborg.u" exported as other package from Editor and not like "BBoyShars" type stupidities. By Any matter these same "cyborg" brain-farts should be NAMED DIFFERENTLY.
If I well recall I've fixed a map with such packages problems a few time ago - pain has gone - and map is running in the same way even has a better A.I.
Music had the same name as a texture and then... I went to hook music in MyLevel in order to not screw the build by messing with texture...
This is one of those cases which if are mismatching players will keep server empty until map is changed or player should load all trash in client which is a no go by default.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Possible trap on a case sensitive file system

Post by Barbie »

JackGriffin wrote:having the alternate case versions on the redirect solved the problem. Is this even possible to fix?
Redirect has nothing to do with above problem, but to answer the question: as you said, one solution is to have files with characters in correct upper and lower case(1), either as a simple copy of the file or smoother with a hard or soft link if the file system supports that. I detect the requirement of such files by inspecting the redirect server's log file for 404 errors (not found) from time to time.

Another solution is to tell the redirect server to do case insensitive search.

Both solutions are nearly impossible if you use a public redirect server, because you don't have the rights to do that usually. If you have ftp access to the redirect server, it may be possible to create hard or soft links.

(1) For example one map may have a reference to "Cyborg.u", another to "cyborg.u" and a third to "CYBORG.U". Then a case sensitive redirect server needs three files with these names having the same content.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Possible trap on a case sensitive file system

Post by JackGriffin »

"Redirect has nothing to do with above problem" then spend the rest basically rehashing what I replied as being the answer :lol2:

If you are savvy enough to be running Linux then you are already versed on the wonderful world of case sensitivity and you should expect this to be a consistent problem. A quick glance at the logs would tell you what to fix. Since very few people run it on their client this is overwhelmingly a redirect problem and one that can be solved pretty easily if you know what needs to be done.
So long, and thanks for all the fish
Post Reply