Application crashes with "Unknown error: Out of range. Cannot lock outside the range of the buffer!"

295
2
06-16-2021 03:40 AM
KarthiSivalingam
New Contributor II

I am using ArcGIS Runtime SDK .net 100.10.0 in WPF application. Sometimes application crashes with the below error. Application having tile layers and some feature layers. In some machines, if the application is kept idle for 5 to 10 mins, then application closes with this exception.

What could be the problem ?

Esri.ArcGISRuntime.ArcGISRuntimeException
HResult=0x80131500
Message=Unknown error: Out of range. Cannot lock outside the range of the buffer!
Source=Esri.ArcGISRuntime
 StackTrace:

at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
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)

 

 

Thanks,

Karthi

Tags (2)
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

That error is coming from our DirectX rendering code. A couple of suggestions/requests:
- Are you able to reproduce with the current release, 100.11?
- Check the status of your display drivers on those machines: are they up to date?
- Can you run DxDiag and click the button `Save All Information...` then attach the resulting text file?

Thanks

0 Kudos
KarthiSivalingam
New Contributor II

Hi,

Thanks for your suggestions.

- Are you able to reproduce with the current release, 100.11?

Ans: I will check it.  As it crashes randomly ,need to check some more time to confirm it.

- Check the status of your display drivers on those machines: are they up to date?

Ans : Yes

- Can you run DxDiag and click the button `Save All Information...` then attach the resulting text file?

Ans: I have attached the file.

Thanks

0 Kudos