[BUG] GC error. The client crashes after each round of the game. #60
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The game or the the DevourClient reported a GC error after each round, which causes an error and the DevourClient accesses an unreachable memory address.
Game version:

No error in the log.
Does it happen when you disable the ESP before the end of the round and activate it again once back in game ?
Yeah. The way you say it will happen much less often. For now, the temporary solution is to disable all ESPs at the end of each round, and then enable them again after the game start in the next round. My guess is that unreachable memory was accessed during a method call while waiting in the lobby.
File:
\lib\public\UnityEngine\Object.hRelate code:
3601c508cb/lib/public/UnityEngine/Object.h (L36)Since there is no way to take screenshots when the game is stuck, I will try to send a detailed error stack the next time it happens again.
@ALittlePatate Below it the screenshot of error call stack. Please check it.
Error stack:
Error1:

Error2:

The temporary solution does not fix this error, and the game will still crash in 2-4 rounds. And it crashed during the game. And not just in the waiting lobby.
that's very weird, but not surprising, I heard that FindObjectOfType and FindObjectsOfType were not "thread safe", i'm not sure how it translates to the present usage tho. I'll try to think of a fix
sounds like a problem with old memory address, maybe the ESP function is trying to get the transform position by the old round address, have you checked it ?
the ESP render thread runs in different speeds with the mainDLL thread as i know, so if the hooked DirectX 11 tries to render the ESP, and the ESP memory is not "allowed" it throws "unreachable memory address."
so one of the possible solutions is, store the current transform address and check it before the ESP try to get it, like the following code:
void GhostHandler::ProcessGhostInfo(app::Ghost* ghost) { // no address if (!ghost) return; // current round ghost if (ghost_ptr == ghost) { return; } // if the old _transform1(address) is equals to the current round ghost if (_transform1 == ghost->fields.gameobject) return; // the address is different, so we are in a new round new_ghost = true; ghost_ptr = ghost;I'm just supposing stuffs here, i apologize for it...
Thanks @ALittlePatate and @JozielBorges
I don't have much experience in game development, so I can only provide stack information for reference. I'm not quite sure how the program works and the timing of the
hookD3D11Presentcall,the crashes all happen while in multiplayer modeThe root cause should be what you guys guessed. Some patterns I've found:doesn't crash in single player mode (even if ESP is always on)Could we avoid a program crash for now? Check the validity of the address before each drawing of the ESP, if it is a valid address continue execution, if it is an invalid address return and record it in the log.
Crashed in single player mode.
thanks for all the material, we're working on a fix rn
@ALittlePatate @JozielBorges @jadis0x

Hey, guys, the game still crashed with the latest fix version. Please help to check it. Thanks.
Below is the screenshot of stack when game crashes.
i haven't encountered this error yet, are you playing in single-player or multiplayer ? also the others errors you have encountered they continue to pop up ?
sorry for the late reply : (
Thanks for the hotfix!
I'll test it later on your branch. This doesn't happen in-game, but on the menu screen after the main game program starts. I updated our latest code on Monday, and unfortunately the game still randomly crashes in 1 or 2 rounds. It's still the same old problem, the program is accessing memory addresses that don't exist.
I don't know much about the logic of our program, I'll make a small suggestion. Could we detect that all ESP related functions are enabled only when the game is in progress.
Hello dear friend, how are you ?
I have done a new update in my branch, can you please test it before i do the pull request 😃?
All the changes :
Hey, I think you have to create a new PR for this.
I can't begin to thank you enough for your work on the ESP, even if i don't always reply I see the messages in the issues and investigate on my free time. Right now my irl work takes the better part of my life, thanks for contributing to the project !
Thank you so much for your kind words! I'm glad to hear that my contributions are helpful. I completely understand how real-life work can take up a lot of time.
I'll go ahead and create a new PR for this. If there's anything specific you need or any issues you want me to prioritize, please feel free to let me know.
By the way, even though I'm kinda new to coding, if you ever need an extra pair of hands at work, I'm always open to job offers. 😉 Ahahahahhaha!
Hi Guys, Thanks for all your efforts.
@JozielBorges I've been testing it for a while on your last PR's branch and it's very stable at times and lasts for 2hours of gameplay. Sometimes it reports this error which related to
GetTransform. Could you help to see what this problem is if you have time? I will continue to test the latest code on your branch, thanks for the quick fix.There is a function inside Unity that can check wether or not a Gameobject is null (even if the pointer isn't), it is used in some places in the code. It is "Object::IsNull". Maybe it can solve this issue
The bug was solved due to the latest code architecture. Thank you all for your excellent skills and contributions. The program is currently very stable and the code is clean and efficient. @ALittlePatate @KnucklesB