1

All of a sudden VS2017 doesn't display the Abort, Ignore, Retry prompt when it is hitting an assert() failure. All it does is output to the output window and exit the program so I can't debug it.

I did a repair install, didn't change anything. JIT is enabled (native code), using debugging version and libraries. It's been working fine.

That is the error I am getting:

Press Retry to debug the application - JIT must be enabled)Assertion failed!
Program: C:\Test\x64\Debug\Test.exe  
File: C:\Test\Test\owner-draw-buttons.cpp  
Line: 144  
Expression: 0 

    For information on how your program can cause an assertion failure, see the 
Visual C++ documentation on asserts (Press Retry to debug the application - JIT 
must be enabled)Debug Error! Program: C:\Test\x64\Debug\Test.exe abort() has 
been called (Press Retry to debug the application) The thread 0x3524 has exited 
with code 3 (0x3). The program '[10772] Test.exe' has exited with code 3 (0x3).

Any ideas on how to fix?

TIA!!

David García Bodego
  • 1,058
  • 3
  • 13
  • 21
df234987
  • 513
  • 2
  • 13
  • 1
    Welcome to SO! Please upload the errors you are getting and bring more details: what were you doing? which exact error you get? Which one is your setup? – David García Bodego Nov 02 '19 at 08:35
  • (Press Retry to debug the application - JIT must be enabled)Assertion failed! Program: C:\Test\x64\Debug\Test.exe File: C:\Test\Test\owner-draw-buttons.cpp Line: 144 Expression: 0 For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)Debug Error! Program: C:\Test\x64\Debug\Test.exe abort() has been called (Press Retry to debug the application) The thread 0x3524 has exited with code 3 (0x3). The program '[10772] Test.exe' has exited with code 3 (0x3). – df234987 Nov 05 '19 at 07:29

1 Answers1

0

For JIT is enabled (native code), maybe you're in a C++ project. I can only guess it have something to do with Windows SDK version and the ucrtbase.dll in it.

To resolve that:

1.Please try updating your VS2017 to latest 15.9.17

2.Updating your windows OS to a newer version(1903 in my machine), see this similar issue(the download link is invalid, I suggest you update Windows system directly instead of installing the sdk separately).

After that, restart PC and create a simple C++ console project with assert(false); to check if now the dialog comes back. Hope it helps :)

In addition, as a temporary workaround, you can try _CrtSetReportMode and _CrtSetReportFile. See this.

LoLance
  • 25,666
  • 1
  • 39
  • 73
  • What's weird is if on the main module I use assert(0), it works, but within the other modules (which is during a SubClass callback handler) it doesn't. See comment above for sample output. – df234987 Nov 05 '19 at 07:29
  • Hi friend ,could you please create a [minimal code example](https://stackoverflow.com/help/minimal-reproducible-example) to help us reproduce this issue, it would make great help when we research it. – LoLance Nov 05 '19 at 08:38