PostHelpInternal Cheat Throwing Errors and Crashing CSGO

Posts 1–4 of 4 · Page 1 of 1
Internal Cheat Throwing Errors and Crashing CSGO
My internal I'm coding is throwing some errors, listed below.

Code:
Exception thrown at 0x7776256A (kernel32.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x00000001.

Exception thrown at 0x7776256A (kernel32.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x6F666E69.

Exception thrown at 0x7776256A (kernel32.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x00007325.

Exception thrown at 0x011A8760 in csgo.exe: 0xC0000005: Access violation reading location 0x00000030.
If I would give it a guess, it would be bad signatures, but what do I know.?
You aren't properly checking for nullptr's.

One example:

Code:
CBaseEntity* LocalPlayer = EntityList->GetClientEntity( Engine->GetLocalPlayer( ) );

if ( LocalPlayer->m_flFlags & FL_ONGROUND ) // bla
The code down below can crash and cause the following access violation:

Exception thrown at 0xwhatever (whatever.dll) in csgo.exe: 0xC0000005: Access violation reading location 0x00000100.
Since LocalPlayer itself was invalid ( the entitylist returned a nullptr ), you are trying to read the value at address 0x100, which you don't have access to.
The access violations are really useful as they in most cases directly tell you where you didn't check for nullptrs due to the address that you tried to read.

Access violation reading 0x100 hints you about a missing nullptr check right before you check the flags, as the flags are at address base + 0x100.

To fix the error above, add a nullptr check right before that.

Code:
CBaseEntity* LocalPlayer = EntityList->GetClientEntity( Engine->GetLocalPlayer( ) );

if ( !LocalPlayer ) return;

if ( LocalPlayer->m_flFlags & FL_ONGROUND ) // bla
Quote Originally Posted by WasserEsser View Post
You aren't properly checking for nullptr's.

One example:

Code:
CBaseEntity* LocalPlayer = EntityList->GetClientEntity( Engine->GetLocalPlayer( ) );

if ( LocalPlayer->m_flFlags & FL_ONGROUND ) // bla
The code down below can crash and cause the following access violation:



Since LocalPlayer itself was invalid ( the entitylist returned a nullptr ), you are trying to read the value at address 0x100, which you don't have access to.
The access violations are really useful as they in most cases directly tell you where you didn't check for nullptrs due to the address that you tried to read.

Access violation reading 0x100 hints you about a missing nullptr check right before you check the flags, as the flags are at address base + 0x100.

To fix the error above, add a nullptr check right before that.

Code:
CBaseEntity* LocalPlayer = EntityList->GetClientEntity( Engine->GetLocalPlayer( ) );

if ( !LocalPlayer ) return;

if ( LocalPlayer->m_flFlags & FL_ONGROUND ) // bla
You are my lord and saviour!

/2short -Plz close @Hunter
Has been solved.

/Closed.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us