Executed a c++ program using visual studio 2017. The program has a recursive loop and that caused the program to terminate unexpectedly without showing any error.
The windows event viewer showed the error code 0xc00000fd.
Faulting application name: dbow2_orb_gpw.exe, version: 0.0.0.0, time stamp: 0x5d8750b5
Faulting module name: dbow2_orb_gpw.exe, version: 0.0.0.0, time stamp: 0x5d8750b5
Exception code: 0xc00000fd
Fault offset: 0x0000000000017cd8
Faulting process id: 0x550c
Faulting application start time: 0x01d57132ded05496
Faulting application path: F:\yandex\YandexDisk\cpp\dbow2\x64\Release\dbow2_orb_gpw.exe
Faulting module path: F:\yandex\YandexDisk\cpp\dbow2\x64\Release\dbow2_orb_gpw.exe
Report Id: eb3d7436-4144-43a6-acce-a3a294e27135
Faulting package full name:
Faulting package-relative application ID:
Solution for Visual Studio:
- Go to solution explorer and select your project
2. Right Click on project and select Properties.
3. Go to Linker -> System -> Set Stack Reserve Size = 400000000, which is Hex equivalent of 1 GB of the stack, you can define your own size in HEX.
4. Now, go to Linker -> All Options and Set Stack Reserve Size = 400000000
5. Now Click Apply and Go to Command Line and verify the term /STACK:”400000000″
6. Go to C++ -> Command Line -> In Additional Options, Add /F 400000000
Execute the program and enjoy.
Solution for command-line execution:
Add a parameter of /STACK:”4000000” with other linker parameters and /F 400000000 with compiling parameters.
In case if the program terminates again, try to increase the size to 800000000 for 2GB Stack.