Stackoverflow on first line

Hi, I have some long code, that was running ok, but, i wanted to do some changes. The code builds fine, but, on the first line, gives a stack overflow exception.

Unhandled exception at 0x53477AD9 (msvcr110d.dll) in ConsoleApplicationa.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00462FE0).


The code that crashes is:

1
2
3
int _tmain(int argc, _TCHAR* argv[])
{	
	std::wstring szwMainFolder = std::wstring(L"E:\\rental-pc-c\\out\\hockey\\");


Can this be caused by errors in onward code, such as, memory leaks?


It doesnt give the "exact same" error, each time. Here is another one:

Unhandled exception at 0x0099E6E9 in ConsoleApplicationa.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00252FD0).


Regards,

c

Last edited on
Can this be caused by errors in onward code, such as, memory leaks?

Memory leaks will cause your program to use up more and more memory, until it cannot get any more memory. And then it may crash with a segmentation fault because of this.
http://en.wikipedia.org/wiki/Memory_leak

A stack overflow occurs when you use more stack memory than you have. You do this by calling a function recursively too many times, or by having local variables that are too big.
http://en.wikipedia.org/wiki/Stack_overflow

Is there a reason why you can't show us the entire code?
I didn't show the entire code because it is huge, but, it crashed on line 1. Anyway, I started over, and this time, no issues!

Thanks!
Topic archived. No new replies allowed.