most rappers pace level aint
at my waist level
How to use ollydbg to find where a crash is being caused.
Hi, first off, I'd like to introduce myself because I'm quite new here, I'm known as Kelse, but many people may also know me as Daz, I've been in the GMod cheating scene since about 2010 and I recently picked up a project that was otherwise put down 3 years ago, I came into the experience with almost 0 understanding of debugging and came out with a little bit more than before, keep in mind that I'm not sure if this will work for other games, and I'm really not some "pro" debugger, I'm still quite new to the entire debugging thing, but it sure helped me find out where crashes were occurring when I had them, so, without further ado, how to use ollydbg to find out where your cheat is crashing.
Step 1: Open ollydbg
Step 2: Click on File -> Attach
Step 3: Lets find our process!
There it is!
Step 4: Click Attach! This is going to take a while, so I hope you're patient.
Note: OllyDbg is prone to crashing while attaching to a process, if this happens, oh well, start from the beginning and continue back down until it decides to work.
Another important note: Be VERY careful what you click on, OllyDbg WILL close the process when it's done.
Step 5: Woohoo! We're in!
You see that little yellow "Paused" down there? Yeah? I know you do, you can't use the game to debug until you unpause!
Step 6: Unpausing, 'cause you need to debug.
You see that little blue arrow?
Click it...go on, click it, until you see this
Step 7: Now, we need to debug!
Sometimes, you'll get a message from OllyDbg saying that the binary you're trying to inject is newer than the .udd data OllyDbg has stored for it, go ahead and click "NO" you DO NOT want to use the OLD data! It can skew your results!
Alright, awesome, we're loaded.
Step 8: Load up the game, and wait for the crash!
Well uh oh...we crashed and the main thread shows nothing anymore.
Step 9: Diagnosing the crash
Step 10: Looking at your code to see where the exception occurred, you have everything you need in front of you.
So I found out GetWeaponID was located in the NoSpread, right click, go to definition!
But...this doesn't help me, hmm...
:eek: That's what it is! GetActiveWeapon has an incorrect offset! Uh oh...but...how do we find the new one?
Step 11: Finding the new offset.
Click the E! Do it, do it, do it! Come on, do it!
Woohoo! We have the binaries loaded by the executable!
Click on "name" to organize them alphabetically.
Now, lets see here...Client.dll? It could very well be in there!
Click click click! (That means click it!)
Awesome, it's open!
Right click -> Search for -> All Referenced Strings
Now we have our strings!
Look familiar...no? Okay.
Right click -> Search for text -> Enter your offset
This isn't the offset I wanted...grrr!
I don't want this one either!
Hey, wake up, we found our offset!
Double click it, do it!
What does all this stuff even mean?!
Don't pay any attention to it, look RIGHT above your string (or below it, sometimes)
There's our offset! Yes! We found it!
Now, what do you do with it?
Go back and put it in where it's required, silly!
Yay, we debugged and found our new offset!
P.S.: "You have included a total of 27 images in your message. The maximum number that you may include is 20. Please correct the problem and then continue again."
Well darn, this would've been more in-depth but I reached the maximum image number
Post Thanks / Like - 5 Thanks