Access violation when debugging simple program on VS2017 (RtlActivateActivationContextUnsafeFast)

0

I've got a strange behaviour on my workstation...

I'm experiencing a crash when launching debugger on a very simple program (basically the template windows application one...) and i got a exception

Exception thrown at 0x000000007719759E (ntdll.dll) in test2.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

when I look in the stack trace in disassembly I am in RtlActivateActivationContextUnsafeFast (from ntdll.dll I guess)

0000000077197591  je          RtlActivateActivationContextUnsafeFast+4Eh (07719755Eh)  
0000000077197593  jmp         string "Enabling heap debug options\n"+10B68h (0771E7B58h)  
0000000077197598  cmp         qword ptr [r8+8],rdx  
000000007719759C  je          RtlActivateActivationContextUnsafeFast+6Ah (07719757Ah)  
000000007719759E  mov         qword ptr [r9],rax 

the exception occurs at the 000000007719759E

any idea on how to fix this? reinstalling VS2017 didn't help, and memory is fine (checked by memtest86)

thanks a lot

Full Stack trace of the buggy thread :

>   ntdll.dll!RtlActivateActivationContextUnsafeFast()  Unknown
    ntdll.dll!LdrpProcessStaticImports()    Unknown
    ntdll.dll!LdrpLoadDll() Unknown
    ntdll.dll!LdrLoadDll()  Unknown
    0000000000060124()  Unknown
c++
visual-studio-2017
ntdll
asked on Stack Overflow Jan 31, 2019 by Deswing • edited Jan 31, 2019 by Deswing

1 Answer

1

I had this similar issue with VS 2017 v15.9.11 for 64-bit exe.

If this is happening only with 64-bit version, this fix worked for me.

Go to Tools >> Options >> Debugging >>
Check this option - "Automatically close the console when debugging stops"

answered on Stack Overflow May 13, 2019 by siddse7en

User contributions licensed under CC BY-SA 3.0