Jump to content
  • 0

MTA Crash - 0xc0000005


kecsmar

Question

Hey, guys.

I've been coding for 3 years now and I hopped in a very big problem, so I hope somebody can help me.

I am developing a server that runs with a RolePlay mod. I know what 0xc0000005 means, but I can't solve it.
I have a script that shows me all the script's CPU usage on server and client-side also.
Nothing runs more than 1-2%, expect the Inventory that can be 5% sometimes, but that's fine imo.

We have a lot of car mods, nothing is more than 15 megabyte all in all.
The server has 7050 megabyte RAM and 7850 MHz CPU for 50 players on average.

Everyone is crashing a day more than 10 times and I don't know what script or car can cause that.
I am using tables ofc, and I clear tables if the player doesn't have to use it on client-side.

I need some tips to fix this problem, have a good day. 

Link to comment

5 answers to this question

Recommended Posts

  • 0

https://pastebin.mtasa.com/999996361

 

Version = 1.5.8-release-20881.1.000
Time = Thu Aug  5 19:199 2021
Module = C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gta_sa.exe
Code = 0xC0000005
Offset = 0x003C91CC

EAX=0F730288  EBX=0F730278  ECX=0028FA90  EDX=00221D20  ESI=00000000
EDI=00000001  EBP=0028FC40  ESP=0028FA70  EIP=007C91CC  FLG=00210202
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

Link to comment
  • 0
  • Scripting Moderators
21 hours ago, kecsmar said:

Offset = 0x003C91CC

This crash is caused by running out of video memory.
https://wiki.multitheftauto.com/wiki/Famous_crash_offsets_and_their_meaning, Ctrl+F and search for 0x003C91CC.

Most likely some script creates textures (fonts, etc), but does not remove them when they are not needed. Or it does not check that some element already exists.

How can this be monitored:
There is a showmemstat command that displays the free video memory for MTA and how much is used by fonts, textures, RTs (+ Screen Sources);
There is a function dxGetStatus, which allows you to monitor this with a script.

How to know which resource is using a texture/font/etc:
2 options: the performancebrowser resource that allows you to monitor the performance in the browser and the ipb resource that allows you to do it directly in the game.
Then you need to select the Lua memory category and specify Client as the target*.
By columns DxFonts (= dxCreateFont), GuiFonts (= guiCreateFont), Textures (= dxCreateTexture), RenderTargets (= dxCreateRenderTarget) and ScreenSources (= dxCreateScreenSource) you can understand whether there is a memory leak or not.

*You can select any client only in the browser.

  • Like 2
Link to comment
  • 0
  • MTA Anti-Cheat Team

Yeah, but besides memory leaks that can also be a server with (a lot of) unoptimized scripts, models/textures. Usually a combination of unoptimized stuff.

If you want to learn more, join MTA discord and read the pinned post in #general (the one written by me), @kecsmar

Link to comment
  • 0

Version = 1.6-release-22650.0.000
Time = Fri Aug 16 04:19:52 2024
Module = C:\ProgramData\MTA San Andreas All\1.6\GTA San Andreas\gta_sa.exe
Code = 0xC0000005
Offset = 0x00401D58

EAX=038742F0  EBX=008D628C  ECX=008241AF  EDX=00000000  ESI=1DC5949C
EDI=00000000  EBP=00000000  ESP=0177FCB4  EIP=00801D58  FLG=00210246
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...