If Your Code is at a Fault

Disassemble near the faulting location to see if what you get is proper code or not. Don't forget that ASCII text may look deceptively valid. Another thing to check is whether ESP and EIP are very close to each other. If so, this suggests a stack-balancing problem (too many pushes or pops). Dump the stack back to find the last known sane location and start working forwards.

Type u cs:eip to see if what you get is proper code or not. If you see any of the following, then you do not have proper code:

If that quick test passes, then type db cs:eip-40 and check if you are in the middle of a data segment. One dead giveaway is that you see ASCII strings in the dump.