I have a condition where in after running the project for say 30hrs or so the project execution goes wierd. I suspect a stack overflow because , when i do attach to ruuning terget and do step by step execution the program execution is not fine. It is not doing sequential execution of code.

How to find out whether any stack overflow has occured or not and the reasons why stack overflow occurs?

I can see in both Call stack and trying to do step by step execution , the way the program jumps from one point to other . What are the reasons for such a behaviour. What can cause my stack overflows - any function returns (because while building the project i saw "all functions do not return a value"), interrupts?????