Stack Overflow

Started by
2 comments, last by Austrian Coder 21 years, 8 months ago
Hi! I get this error if i start my app: untreated exception in Demo_1.exe(Kernel32.Dll): 0xC00000FD: Stack Overflow All runs very fine but ´when i close the app i get this error (VC++ Debugger). Can someone help me?
Advertisement
Allocate large data structures on heap (new,malloc) instead of stack. An example:

  // badint large_array[1024][1024];// better, i.e. no stack overflow issuesint* large_array = new int[1024*1024];  


Hope this helps,
Pat

PS: You can also increase you stack frame (look at the VC documentation for more info on this topic).
You''ve got a heck of a lot of stack space in Windows, it grows the stack automagically.

I''d say the stack overflow is caused by a bad recursive call (i.e. no return path to halt the recursion).
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Thx @ all!

I found my error. When closing the app there is an never ending loop. Now all works very very fine!

Austrian Coder

This topic is closed to new replies.

Advertisement