We have a C++ MFC application with COM interop for Managed C# code. Recently migrated to Windows 10 from windows 7.
Application crashes intermittently pointing to below information in crash dump
Exception code: C0000005
Exception Info: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
And in Event log Error "The process was terminated due to an internal error in the .Net Runtime at IP xxxxxxxxx with exit code 80131506"
Please find below information from extracted from crash dump through DebugDiag tool.
NET Call Stack
[[ComMethodFrame]]
DomainBoundILStubClass.IL_STUB_PInvoke()+68
[[InlinedCallFrame] (.wWinMainCRTStartup)] .wWinMainCRTStartup()
[[GCFrame]]
Full Call Stack
clr!COMToCLRWorker+a4
clr!GenericComCallStub+57
[[ComMethodFrame]]
myapp+3bcac1
myapp+11fe20
myapp+dacf9
mfc140u!CWnd::OnWndMsg+bdd
mfc140u!CWnd::WindowProc+3f
mfc140u!AfxCallWndProc+135
mfc140u!AfxWndProc+54
mfc140u!AfxWndProcBase+51
user32!UserCallWinProcCheckWow+266
user32!DispatchClientMessage+9c
user32!_fnDWORD+33
ntdll!KiUserCallbackDispatcherContinue
win32u!NtUserGetMessage+14
user32!GetMessageW+2d
mfc140u!AfxInternalPumpMessage+27
mfc140u!CWnd::RunModalLoop+108
mfc140u!CWnd::CreateRunDlgIndirect+3f
mfc140u!CDialog::DoModal+18b
myapp+36b5e9
myapp+3711f6
myapp+3728f6
mfc140u!AfxWinMain+84
myapp+4dfe1e
DomainBoundILStubClass.IL_STUB_PInvoke()+68
[[InlinedCallFrame] (<Module>.wWinMainCRTStartup)] <Module>.wWinMainCRTStartup()
clr!CallDescrWorkerInternal+83
clr!CallDescrWorkerWithHandler+4e
clr!MethodDescCallSite::CallTargetWorker+102
clr!RunMain+266
[[GCFrame]]
clr!Assembly::ExecuteMainMethod+b7
clr!SystemDomain::ExecuteMainMethod+643
clr!ExecuteEXE+3f
clr!_CorExeMainInternal+b2
clr!CorExeMain+14
mscoreei!CorExeMain+112
mscoree!CorExeMain_Exported+6c
kernel32!BaseThreadInitThunk+14
ntdll!RtlUserThreadStart+21
-------------------------------------------------------------------
Finalizer Thread
ntdll!NtWaitForSingleObject+14
KERNELBASE!WaitForSingleObjectEx+93
clr!CLREventWaitHelper2+3c
clr!CLREventWaitHelper+1f
clr!CLREventBase::WaitEx+7c
clr!FinalizerThread::WaitForFinalizerEvent+44
clr!FinalizerThread::FinalizerThreadWorker+54
clr!ManagedThreadBase_DispatchInner+39
clr!ManagedThreadBase_DispatchMiddle+6c
clr!ManagedThreadBase_DispatchOuter+75
[[DebuggerU2MCatchHandlerFrame]]
clr!FinalizerThread::FinalizerThreadStart+126
clr!Thread::intermediateThreadProc+86
kernel32!BaseThreadInitThunk+14
ntdll!RtlUserThreadStart+21
Requesting your support for fixing the issue.