Select to view content in your preferred language

ArcGIS Runtime WPF application crashes when kept idle for sometime.

892
4
04-29-2022 06:18 AM
Sukhesh_Krishna
Emerging Contributor

Hi All,

We have a WPF windows application developed using ArcGIS Runtime. It's crashing if kept idle for some time (Like an hour or so) and then any operation is performed. The application has a basemap  from ArcGIS Enterprise and feature layers from multiple mobile geodatabases.

Appreciate if anyone had similar issues and has any solution for this.

Details:

ArcGIS Runtime 100.10

.NET Framework 4.6.1-WPF

Windows 10 OS

Application Error:

Faulting application name: ----.exe, version: 1.0.0.0, time stamp: 0xcad87a4f

Faulting module name: KERNELBASE.dll, version: 10.0.19041.1566, time stamp: 0x0833f2d4

Exception code: 0xe0434352

Fault offset: 0x0000000000034f69

Faulting process id: 0x1228

Faulting application start time: 0x01d85ba9e16f1689

Faulting application path: D:\Program Files\----\---\---.exe

Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll

Report Id: 88624813-9b16-492c-a501-0647058d29fe

Faulting package full name:

Faulting package-relative application ID:

 

.NET Runtime Error:

Application: ---.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: Esri.ArcGISRuntime.ArcGISRuntimeException

   at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(RuntimeCoreNet.GeneratedWrappers.CoreError, Boolean)

   at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr, Boolean, System.Runtime.InteropServices.GCHandle)

   at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()

   at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(System.Object, System.EventArgs)

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)

   at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(System.Object)

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Threading.ThreadHelper.ThreadStart(System.Object)

 

Thank you,

Sukhesh Krishna.

0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor

Thanks for reporting this. A couple of question:
1. Are you able to see what message the Esri.ArcGISRuntime.ArcGISRuntimeException contains? (you might be able to catch it in an global unhandled exception handler)

2. Did the PC go into standby or screen saver mode during the time? This could potentially cause a GPU issue related to resuming rendering that might not be handled right (again the exception message would be helpful here)

0 Kudos
Sukhesh_Krishna
Emerging Contributor

Hi,

1. Following is the stack-trace of the exception

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.CoreRT_GeoView_pulse(IntPtr thisHandle, IntPtr& outErrorHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)

2. Only application is kept idle, the system was being used and didn't go to standby or screen saver mode. 

 

Thank you,

Sukhesh Krishna

0 Kudos
dotMorten_esri
Esri Notable Contributor

Are you also able to reproduce this with v100.14.0 ? Is it possible to make a small sample application with repro steps that demonstrates the problem?

0 Kudos
Sukhesh_Krishna
Emerging Contributor

Upgrade to V100.14 seems to have resolved the issue.

Thank you.

0 Kudos