0

I developed application with ArcGIS. This application use TCP, and receive data from other PC.

When built with Debug Build and received data, the application terminated abnormally and I got error.

Error statement:

D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\misc\amd64\chkstk.asm:109: Error: Debugger encountered an exception: Exception at 0x7ff63934e988, code: 0xc00000fd: stack_overflow, flags=0x0 (first chance)

After that, I tried to build with Release Build and received data. Strangely enough, it was received without error.

What's the difference between the two? How to avoid errors?

My environment

  • OS: Windows10
  • QtCreator: 4.14.0_rc1
  • Kit: Qt5.15.0 MSVC2019 64bit
  • ArcGIS: 100.8
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
tkm-knj
  • 19
  • 5
  • This question seems a bit broad to me without a specific sample. In a Debug build, there are a lot more things included which uncover mistakes or even Undefined Behavior. (E.g. `std::vector::operator[]` has a range check.) This comes with the price of more memory consumption and lower performance. Not to mention, that Debug builds are not optimized. A specific example of stack overflow in debug but not in release could be a recursive function where tail optimization is applied (in release). – Scheff's Cat Dec 10 '20 at 07:25
  • Unfortunately, the above facts mean as well that behavior of Debug and Release is not always the same. I had (fortunately only a few) scaring occurrences where Debug was fine but Release not. (Oh oh, how to debug this?) (Example: [Qt renders this SVG correctly in “debug” mode but not in “release”](https://stackoverflow.com/a/55898356/7478597)) – Scheff's Cat Dec 10 '20 at 07:30
  • Please, try to reduce your code to a [mcve]. (The link provides hints for how to do this.) If this doesn't even solve your issue, you have at least something you can copy/paste into your question. ([edit]) – Scheff's Cat Dec 10 '20 at 07:32

0 Answers0