Random game crash (dll reading values)

Swift Games Accounts
  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • ► You must register to download attachments!


Dank Tier VIP
May 19, 2013
Hi guys,

problem: everytime I inject my DLL into my game it randomly crashes after a few seconds at reading a std::string from memory.
debugging: I set some _cprintf() to see where exactly the last line code was executed before the crash happened. The last line that was printed in the console was either "read out position" or "read out still on server".
After both of these _cprintf() instructions the DLL should read out and store a std::string into another std::string. I think one can certainly say that this instruction is causing the crash. But why, and why so randomly?

!!! Problem already fixed - See edit 4 at the end of the post !!!

//crappy code removed :eek:

Edit 1: Okay I just noticed (after I removed all the code which had something to do with strings) that the game crashes on other variables too... That's just so weird. I get no compiler errors and the game crashes randomly.
In my old code though I can reproduce this crash problem by reading the exact same address for the funstuff. I now commented out all the funstuff related parts in my new code but the game still crashes.
It reads out all the information for the first 1~3 players and then it crashes. Does someone have a hunch what possibly could be wrong?

Edit 2: Posted more source code for better understanding.
Edit 3: Ah could it be that I totally screwed up all the call-by-references? I never used them before. I just realized that the values stored as final addresses in my DWORDs (which get read out) are all wrong -.- :facepalm:
Okay I try to fix this first, I come back when I'm done and it won't work nonetheless.

Edit 4: Okay I fixed it myself ^^ Hack is working fine and no crashes :) Hack release and source is coming soon! Sorry for those who read all this crappy code I posted...
Thread can be closed I think :D

Last edited: