Skip to content

“[CD48] File error reading gta3.img #4137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
trailbl4zer opened this issue Apr 1, 2025 · 1 comment
Open
1 task done

“[CD48] File error reading gta3.img #4137

trailbl4zer opened this issue Apr 1, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@trailbl4zer
Copy link

trailbl4zer commented Apr 1, 2025

Describe the bug

When having a modified gta3.img, the game will stutter every time the player tries to load that modified texture in game. Every time a custom texture is streamed in, the game will freeze and then unfreeze. If trying to do it when offline on a local server, the game will just kick you showing an error:

[CD48] File error reading gta3.img

(This doesn't happen with an unmodified gta3.img)

Possible Cause

Possible cause

Also, there seems to be a function running all the time to detect modified gta3.img files from players. Every time I load a new texture, the number adds up. If that texture was already registered as modified and I go through the same place again, the lag spike won't happen.

Screenshot of a list with detected custom textures:

(This list gets updated even with the resource off, leaving the possibility that this function gets executed all the time)

Image

My Experience & Related Issues

My experience

In my case, I had applied mipmapping to all my gta3.img textures since without it the game textures look very grainy and aliased, specially in movement. However, that causes multiple issues.

It looks like the game is patching the gta3.img in runtime, or at least comparing it to a remote template via the internet, since some animations only present in the 1.0 version of the game get deleted too, making me think the game is comparing or rewriting the gta3.img based on a template or base file. That would explain the constant stutters when streaming in new textures and the kicking when losing internet connection.

It looks like two similar issues had been reported in the past too, one particularly about mipmapping not working. The author of that post wondered if it was some kind of anti cheat prevention measure that caused unexpected issues, too.

#1774

Also, that post seems to have been connected to another issue, that caused the exact same error of [CD48] File error reading gta3.img I am experiencing right now.

#1776

I guess this may be a bit harder to fix if it truly is some anti cheat prevention, since ccw mentioned in #1776 it was an issue in MTAHQ back then.

Steps to Reproduce

Steps to reproduce

  1. Explore the map with an unmodified gta3.img: no lag spikes, textures load fast, you don't get kicked when offline on local server (like it the game tried to download the default textures and failed, and as a countermeasure, it kicks you)

  2. Modify the gta3.img and see all of these problems happen. (In my case, I just added mipmaps to the textures)

Expected Behavior

Expected behavior

Custom gta3.img shouldn't cause these problems, specially since they were considered undesired bugs in the past. It looks like they came back from some update on the recent years, since I recall it still happening some time ago.

Version Information

Version

Version:

Client: Multi Theft Auto v1.6-release-23115

Server: MTA:SA Server v1.6-release-23114

Additional Context & Details (Expand to see specific issues and media)

Additional context

Problems caused by the custom gta3.img files detector

1. [CD48] File error reading gta3.img (Click to expand)

Image

2. Disconnected when trying to load modified textures when offline (Click to expand)
2025-04-01.01-09-55.mp4
3. Video showing lag spikes when streaming modified textures with internet connected (Click to expand)
2025-04-01.01-09-16.mp4
4. Some animations are removed on runtime if using custom gta3.img (Click to expand)

(I know it may sound funny, but I realized this because the animations in the SEX animation blocks don't work if even one texture is modified. That's why I suspect that could be the issue.) Video attached showing this and mipmapping.

2025-04-01.00-50-10.mp4
5. Video showcasing animations work when gta3.img isn't modified (Click to expand)
2025-04-01.01-16-26.mp4

Load times comparison

6. Video showcasing that lag spikes don't happen with default gta3.img, and textures load WAY faster (Click to expand)

(Well, there were some little lag spikes, but way less)

2025-04-01.01-21-49.mp4
7. Video showcasing the way longer load times with modified gta3.img and the function detecting modified gta3.img (Click to expand)

(it still shows up even if admin resource is disabled while exploring)

2025-04-01.01-27-50.mp4
8. Video showing faster load times with unmodified gta3.img, no lag spikes, and no kicks when offline (Click to expand)
2025-04-01.01-34-10.mp4

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@trailbl4zer trailbl4zer added the bug Something isn't working label Apr 1, 2025
@trailbl4zer trailbl4zer changed the title [CD48] File error reading gta3.img if offline. / Game will try to patch gta3.img when streaming in modified textures when internet connection. [CD48] File error reading gta3.img if offline. / Game will try to patch gta3.img when streaming in modified textures when on internet connection. Apr 1, 2025
@trailbl4zer trailbl4zer changed the title [CD48] File error reading gta3.img if offline. / Game will try to patch gta3.img when streaming in modified textures when on internet connection. "[CD48] File error reading gta3.img" if offline. / Game will try to patch gta3.img when streaming in modified textures when on internet connection. Apr 1, 2025
@trailbl4zer trailbl4zer changed the title "[CD48] File error reading gta3.img" if offline. / Game will try to patch gta3.img when streaming in modified textures when on internet connection. “[CD48] gta3.img verification bug: Lags online, kicks offline players” Apr 1, 2025
@trailbl4zer trailbl4zer changed the title “[CD48] gta3.img verification bug: Lags online, kicks offline players” “[CD48] File error reading gta3.img | Modification verification bug: Lags online, kicks when offline Apr 1, 2025
@trailbl4zer trailbl4zer changed the title “[CD48] File error reading gta3.img | Modification verification bug: Lags online, kicks when offline “[CD48] File error reading gta3.img | Modification verification bug: Lags when verifying online, kicks when offline Apr 1, 2025
@trailbl4zer trailbl4zer changed the title “[CD48] File error reading gta3.img | Modification verification bug: Lags when verifying online, kicks when offline “[CD48] File error reading gta3.img Apr 11, 2025
@trailbl4zer trailbl4zer changed the title “[CD48] File error reading gta3.img “[CD48] File error reading gta3.img | Custom gta3.img getting patched in runtime Apr 11, 2025
@trailbl4zer trailbl4zer changed the title “[CD48] File error reading gta3.img | Custom gta3.img getting patched in runtime “[CD48] File error reading gta3.img Apr 11, 2025
@trailbl4zer
Copy link
Author

Updated the bug report after more observation, and improved the text presentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant