Daily Usage Issues

VS Crash - A heap has been corrupted

Started by Silvenga on 6,491 views

I'm seeing a crash in VS2019 on startup running NCrunch 3.29.


Unhandled exception at 0x7766F8CD (ntdll.dll) in devenv.exe.18532.dmp: 0xC0000374: A heap has been corrupted (parameters: 0x776AB960).

ntdll.dll!7766f8cd() Unknown
ntdll.dll![Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] Unknown
[External Code]
[Managed to Native Transition]
EasyHook.dll!EasyHook.NativeAPI.LhInstallHook(System.IntPtr InEntryPoint, System.IntPtr InHookProc, System.IntPtr InCallback, System.IntPtr OutHandle) Unknown
EasyHook.dll!EasyHook.LocalHook.Create(System.IntPtr InTargetProc, System.Delegate InNewProc, object InCallback) Unknown
nCrunch.VSAddIn.dll!nCrunch.VSAddIn.LaaFix.() Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown
[Native to Managed Transition]
[External Code]


I can provide a couple of dumps directly - they are large 2GB.
Deleting the cache from the `.vs` mitigates the issue - so no idea what could be happening.
Thanks for sharing this issue. The code shown above is an old workaround we implemented to correct VS process memory management issues in older operating systems. I suspect the problem here may actually be indirect - although we're on the stack trace for this one, it's possible there is already heap corruption in place or there may be a plugin clash involved.

Can you confirm if this problem is still present for you? Or can be reproduced?
Visual Studio 2019 has been randomly crashing, since GA (The only third party plugins installed are R# and NCrunch). The fix is normally to delete the .vs folder cache.

This was the first time I was able to catch a dump, and every crash since has had the same stacktrace.

- Still present? - likely, but I can't prove that. The problem is currently mitigated.
- Reproducible? - I can reproduce the crash after the first occurance (until I delete the .vs folder cache), VS likes to crash silently and restart (so it loops until I kill VS with Taskmgr). I can't reproduce the first crash though.

What kind of sucks is that I can't live without NCrunch or R# :D - my productivity will definitely drop to test if either one causes the problem. If you don't think NCrunch is at fault, then I'll likely have to live with it. R# and VS is unlikely to provide any help with NCrunch in the stacktrace.
Silvenga wrote:
What kind of sucks is that I can't live without NCrunch or R# :D - my productivity will definitely drop to test if either one causes the problem. If you don't think NCrunch is at fault, then I'll likely have to live with it. R# and VS is unlikely to provide any help with NCrunch in the stacktrace.


Thanks for the extra detail. I can understand that there isn't really anything else you can do here. We've created a task on our side to pull this code out, as it's unlikely people are still using the environments it was intended to fix up. Probably it's creating more problems than it solves now.

Post a reply

Log in to reply.