we have .net windows application which is running on surface by client.application sometime crashes and every time scenario is different but in event logs exception is same system.runtime.interopservices.sehexception was unhandled. i cannot reproduce this issue. here is the stack trace:
Exception Info: System.Runtime.InteropServices.SEHException
at SpectrumNZ.GUI.Modules.frmMainShell.Dispose(Boolean)
at System.ComponentModel.Component.Finalize()
and here is event logs:
Faulting application name: SmartClient.exe, version: 0.0.0.0, time stamp: 0x5bb5f8a9
Faulting module name: clr.dll, version: 4.7.3130.0, time stamp: 0x5b175f1a
Exception code: 0xc0000006
Fault offset: 0x0007ca5b
Faulting process id: 0x1cac
Faulting application start time: 0x01d47c695f8665dc
Faulting application path: {path}\SmartClient.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: 42f6b2d5-0936-4033-a6eb-edff18e8d7fa
Faulting package full name:
Faulting package-relative application ID:
cannot understand what is the issue behind. after doing some search i have found that it might be network issue but i'm not sure. i have update question with code where occurs
protected override void Dispose(bool disposing)
{
if (disposing )
{
FlushMemory();
//--------------------------------------
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
[System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Ansi, SetLastError = true)]
private static extern int SetProcessWorkingSetSize(IntPtr process, int minimumWorkingSetSize, int maximumWorkingSetSize);
public static void FlushMemory()
{
GC.Collect();
GC.WaitForPendingFinalizers();
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
}
}
Please help me to find the cause of this exception. Thanks
User contributions licensed under CC BY-SA 3.0