New CJ Clothing has a size limitation
Opened this issue · 0 comments
Describe the bug
So I was playing with the new clothes functions and I kept getting this crash
Version = 1.6-release-23324.0.000
Time = Wed Sep 3 04:54:55 2025
Module = C:\ProgramData\MTA San Andreas All\1.6\GTA San Andreas\gta_sa.exe
Code = 0xC0000005
Offset = 0x003ECABB
EAX=0000000C EBX=008E48AC ECX=00000003 EDX=000EFFBF ESI=3BAF0FFF
EDI=0177EFD4 EBP=0000000C ESP=0177EF94 EIP=007ECABB FLG=00010216
CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
I wasn't sure what it was since the function in which it was crashing was RwStreamRead, but eventually after much try and error I found out that if the file is "too big" the game will be unable to read it and it will crash.
I didn't try it fully but the model that was crashing had 5556 polygons, and after reducing it by half I started getting another crash offset which I was able to fix (wrong Frame index in the atomic and also for some reason the names for the clumps weren't exporting correctly).
So, a .dff file thats around 500kb is fine and will work as intended, but the closer you get to a megabyte the more likely it will crash. My previous file was 900kb~. I am not sure where the line is tho.
The crash only happens when the model is trying to be rendered, not when it is allocated.
@W3lac3 might know why this happens and how to circumvent it.
Steps to reproduce
- Add some new clothes that have a high poly count
- Allocate them
- Create a ped with CJ skin (id 0) and put the new allocated clothes
- Crash
Version
No response
Additional context
If the model is not too heavy, but it is not ready to be used as clothes, the crash offset will be 0x001A49D4.
Relevant log output
Security Policy
- I have read and understood the Security Policy and this issue is not security related.