Skip to content

Textures Memory Leak (Virtual) #4554

@marlonzemella

Description

@marlonzemella

Describe the bug

Memory leak that causes crashes on servers that use many textures, even if it destroys the elements and manages resources correctly

Steps to reproduce

1 - Download the resource below
2 - Start the resource
3 - Use the “ctextures” command a few times
4 - Check the virtual memory usage (located in the lower left corner of the screen)
5 - Use the “dtextures” command and check virtual memory usage again
6 - You can repeat the process as many times as you want; it seems to be related to the number of textures already created.
7 - If you get close to 4096 MB, start walking around the map, do anything that increases RAM usage a little more, and that's it, you'll crash
8 - This behavior does not occur when using “dxCreateTexture(Width, Height)”.

Version

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

Additional context

Video of the incident:
https://www.youtube.com/watch?v=nAyrUDaesdQ

TexturesMemoryLeak.zip

Edit: If you create textures with your RGBA pixels, there will be no memory leak.

Relevant log output

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions