How do I go about tracking down a random StackOverflowException on Windows? Seems to just be occurring on Windows 10 (latest version).
Sometimes it will happen as soon as I open a project. Other times it will be when I do random things. Most often it's fine and never happens.
Are there error logs somewhere on Windows that I could check? I'm not much of a Windows guy so I don't know.
Supposing I do find out what's causing it, how do I go about preventing it?
From the documentation it says "This happens when the calling chain gets too long. This can easily happen when your code makes a recursive call without providing a way to terminate the recursion-or the condition that terminates the recursive call takes too many calls to occur."
Does just adding something like
If err IsA StackOverflowException Then
MessageBox("The stack has overflowed!")
prevent it from crashing? Or is it going to crash anyway and that's just telling you "bye bye"?