I think I know the function (call it function2) where the stackoverflow is occuring. However, I have added a try-catch statement around the whole function-body, put a break in the catch section but when the stackoverflow occurs it does not pause in the catch statement. However, if I go to the previous function (call it function1) which calls function2(), stepping over the function2() call does throw the exception.
I went to Debug -> Exceptions and most things are ticked.
I am using VS2012.
Are there any other ways I can check? This is what I essentially did:
void function1(){
//Code does reach line below.
function2();
//Code never reaches here
}
void function2(){
try{
//All the logic for function2();
}
catch(exception& e){
//I put a break point here but it never catches the break point
}
}
EDIT: There is something in function2() which is causing this. The function does a lot of char processing and I have tried moving everything to pointers- but I still get the exception.
What is the best process to debug this problem in VS2012 if I cannot use exception-handling?
EDIT2: How can I see the stack size/growing in Visual Studio?