ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.55k stars 594 forks source link

Model Loading Error in Counter-Strike 1.6 After Latest Update #3760

Open savemgs opened 3 months ago

savemgs commented 3 months ago

I trust this message finds you all well. I am writing to bring to your attention a recently encountered issue in Counter-Strike 1.6 following the latest update. I have successfully replicated some phenomena, though not identical, on other maps containing models with lengthy names.

The map shared below is one of my own creation, having served on our community server for approximately seven years without issues. Strangely, problems have emerged only after the recent update. Moreover, a few other maps demonstrate peculiar behavior, such as player kicks without causing server crashes. The game log now displays the following error:

21:38:35 FATAL ERROR (shutting down): Mod_LoadModel: Bad model name length:models/props/cheap_leather_office_chair_black.mdl

I'm sorry I can't provide a more detailed analysis but I'm having difficult explaining.

Best regards, - Slade Krowley -GSU-

SamVanheer commented 3 months ago

The model name (cheap_leather_office_chair_black) is too long. Shorten it to 31 ASCII characters or fewer (excluding file extension).

Note that this check does not exist in the OpenGL version of the game. Loading this model could cause a buffer overflow there.

savemgs commented 3 months ago

The model name (cheap_leather_office_chair_black) is too long. Shorten it to 31 ASCII characters or fewer (excluding file extension).

Note that this check does not exist in the OpenGL version of the game. Loading this model could cause a buffer overflow there.

Hello my friend I appreciate the timely response but I must say I disagree with your assessment. Considering myself and hundreds of other people played on that map for about seven years since it was made without any issues. But this started since the latest CS update I assure you that is not the case at least in this instance. Perhaps it is something else?

SamVanheer commented 3 months ago

Were you playing the map using the OpenGL renderer or the Software renderer before this update?

savemgs commented 2 months ago

Were you playing the map using the OpenGL renderer or the Software renderer before this update?

OpenGL.

hzqst commented 2 months ago

Were you playing the map using the OpenGL renderer or the Software renderer before this update?

OpenGL.

The error string "Mod_LoadModel: Bad model name" is not a thing in hw.dll (OpenGL version of the game)

image

image

image

Btw loading a studiomodel with namelength >= 32 should be technically considered as an undefined behavior. It doesn't mean you are correct (I mean, It doesn't mean your studiomodel name/file's internal format is technically legit) even if you had never encountered into crash before.

SamVanheer commented 2 months ago

Were you playing the map using the OpenGL renderer or the Software renderer before this update?

OpenGL.

Only the Software renderer has this check which is why you're getting the error now. Switching to the OpenGL renderer will stop causing the error to occur but as hzqst said the model name is still too long.