Stack overflow is usually pretty easy to detect.
Nearly 100% of such cases is when you use recursion or mutual recursion (of more than one methods calling each other in cycle). In such cases, your bug is not providing a condition when this recursion ever finishes.
See
http://en.wikipedia.org/wiki/Recursion[
^].
It needs your code of course, but you can do it yourself.
In my solution to this question I explain how this condition occurs and how to solve this problem:
System.StackOverflowException' occurred in sample.DLL[
^].
—SA