Hello,
We have embedded a WPF user control containing a MapView control into a .NET Framework 4.8 32 bit desktop application. This MapView points to two map services (one with the basemap and another with the features distributed in different layers) running on an ArcGIS Desktop 10 (10.0.5.4400). We are using version
The map works ok, but we are experiencing random issues that are causing our app to crash. I was wondering if there is a way I could trap this kind of error, so at least it doesn't make my app crash?
On Windows application event log we find the following:
Exception information: 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.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(System.Object, System.EventArgs)
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement+<>c.<AttachRenderingEvent>b__29_0(Esri.ArcGISRuntime.Internal.HostedSurfaceElement, System.Object, System.EventArgs)
at Esri.ArcGISRuntime.Internal.WeakEventListener`4[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].OnEvent(System.__Canon, System.__Canon)
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 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
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 System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(System.Object)
at System.Threading.ThreadHelper.ThreadStart_Context(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)
We have analyzed a memory some memory dumps, and we have the same in all of them:
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************DEBUG_FLR_EXCEPTION_CODE(80131500) and the ".exr -1" ExceptionCode(e0434352) don't match
!ip2md 8bafe98MethodDesc: 1cad1e48
Method Name: Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(System.Object, System.EventArgs)
Class: 1b1fe00c
MethodTable: 1cad1edc
mdToken: 06000290
Module: 0fb5271c
IsJitted: yes
CodeAddr: 08bafda8
Transparency: Critical
!ip2md 8bafbaaMethodDesc: 1cad896c
Method Name: Esri.ArcGISRuntime.Internal.HostedSurfaceElement+<>c.<AttachRenderingEvent>b__29_0(Esri.ArcGISRuntime.Internal.HostedSurfaceElement, System.Object, System.EventArgs)
Class: 0824d1e8
MethodTable: 1cad8984
mdToken: 06000337
Module: 0fb5271c
IsJitted: yes
CodeAddr: 08bafb98
Transparency: CriticalKEY_VALUES_STRING: 1
Key : Analysis.CPU.Sec
Value: 3716Key : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on VIRTNOVA002Key : Analysis.DebugData
Value: CreateObjectKey : Analysis.DebugModel
Value: CreateObjectKey : Analysis.Elapsed.Sec
Value: 4284Key : Analysis.Memory.CommitPeak.Mb
Value: 393Key : Analysis.System
Value: CreateObjectKey : CLR.Engine
Value: CLRKey : CLR.Esri.ArcGISRuntime.ArcGISRuntimeException._message
Value: Unknown error: Out of memory. bad allocationKey : CLR.Version
Value: 4.0.30319.0Key : Timeline.Process.Start.DeltaSec
Value: 1095
NTGLOBALFLAG: 0PROCESS_BAM_CURRENT_THROTTLED: 0
PROCESS_BAM_PREVIOUS_THROTTLED: 0
APPLICATION_VERIFIER_FLAGS: 0
CONTEXT: (.ecxr)
.ecxr
eax=08d4e8a8 ebx=00000005 ecx=00000005 edx=00000000 esi=08d4e968 edi=00000001
eip=768fb982 esp=08d4e8a8 ebp=08d4e900 iopl=0 nv up ei pl nz ac po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212
KERNELBASE!RaiseException+0x62:
768fb982 8b4c2454 mov ecx,dword ptr [esp+54h] ss:002b:08d4e8fc=a0e62415
.cxr
Resetting default scopeEXCEPTION_RECORD: (.exr -1)
.exr -1
ExceptionAddress: 768fb982 (KERNELBASE!RaiseException+0x00000062)
ExceptionCode: e0434352 (CLR exception)
ExceptionFlags: 00000001
NumberParameters: 5
Parameter[0]: 80131500
Parameter[1]: 00000000
Parameter[2]: 00000000
Parameter[3]: 00000000
Parameter[4]: 73a30000PROCESS_NAME: NVO_Manager.exe
EXCEPTION_CODE_STR: 80131500
MISSING_CLR_SYMBOL: 0
FAULTING_THREAD: ffffffff
STACK_TEXT:
08d4eab8 1961d5f6 Esri_ArcGISRuntime!Esri.ArcGISRuntime.ArcGISException.HandleCoreError+0x26
08d4eac4 102939d3 Esri_ArcGISRuntime!RuntimeCoreNet.GeneratedWrappers.Interop.CheckError+0x4b
08d4ead8 1b1aff85 Esri_ArcGISRuntime!RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse+0x35
08d4eae8 08baffd8 Esri_ArcGISRuntime_WPF!Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse+0x38
08d4eaf4 08bafe98 Esri_ArcGISRuntime_WPF!Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering+0xf0
08d4eb24 08bafbaa Esri_ArcGISRuntime_WPF!Esri.ArcGISRuntime.Internal.HostedSurfaceElement+__c._AttachRenderingEvent_b__29_0+0x12
08d4eb30 08bafb72 Esri_ArcGISRuntime!Esri.ArcGISRuntime.Internal.WeakEventListener_4[[System.__Canon,_mscorlib],[System.__Canon,_mscorlib],[System.__Canon,_mscorlib],[System.__Canon,_mscorlib]].OnEvent+0x6a
08d4eb48 6a1bf9f5 PresentationCore_ni!System.Windows.Media.MediaContext.RenderMessageHandlerCore+0x125
08d4eb84 6a1c6861 PresentationCore_ni!System.Windows.Media.MediaContext.AnimatedRenderMessageHandler+0x71
08d4eb9c 6acbee42 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall+0x52
08d4ebbc 6acbed85 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.TryCatchWhen+0x35
08d4ec00 6acc10cd WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeImpl+0xdd
08d4ec38 6acbf56f WindowsBase_ni!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext+0x3f
08d4ec40 6acd0592 WindowsBase_ni!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper+0x42
08d4ec54 7298f474 mscorlib_ni!System.Threading.ExecutionContext.RunInternal+0xc4
08d4ecc0 7298f3a7 mscorlib_ni!System.Threading.ExecutionContext.Run+0x17
08d4ecd4 7298f364 mscorlib_ni!System.Threading.ExecutionContext.Run+0x44
08d4ecec 6acc0f3a WindowsBase_ni!MS.Internal.CulturePreservingExecutionContext.Run+0x9a
08d4ed1c 6acc0d80 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.Invoke+0x50
08d4ed50 6acbd346 WindowsBase_ni!System.Windows.Threading.Dispatcher.ProcessQueue+0x176
08d4ed90 6acbc57c WindowsBase_ni!System.Windows.Threading.Dispatcher.WndProcHook+0x5c
08d4eddc 6acbe661 WindowsBase_ni!MS.Win32.HwndWrapper.WndProc+0xa1
08d4ee18 6acbe94c WindowsBase_ni!MS.Win32.HwndSubclass.DispatcherCallbackOperation+0x6c
08d4ee28 6acbee42 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.InternalRealCall+0x52
08d4ee48 6acbed85 WindowsBase_ni!System.Windows.Threading.ExceptionWrapper.TryCatchWhen+0x35
08d4ee8c 6acbcf62 WindowsBase_ni!System.Windows.Threading.Dispatcher.LegacyInvokeImpl+0x142
08d4eee8 6acbe4b4 WindowsBase_ni!MS.Win32.HwndSubclass.SubclassWndProc+0xf4
00000000 00000001 WindowsBase_ni!MS.Win32.UnsafeNativeMethods.DispatchMessage+0x2
08d4f11c 6acbb3d7 WindowsBase_ni!System.Windows.Threading.Dispatcher.PushFrameImpl+0xbb
08d4f164 6acbb319 WindowsBase_ni!System.Windows.Threading.Dispatcher.PushFrame+0x4d
08d4f170 08baf25c Esri_ArcGISRuntime_WPF!Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker+0x134
08d4f188 729b8366 mscorlib_ni!System.Threading.ThreadHelper.ThreadStart_Context+0x76
08d4f194 7298f474 mscorlib_ni!System.Threading.ExecutionContext.RunInternal+0xc4
08d4f200 7298f3a7 mscorlib_ni!System.Threading.ExecutionContext.Run+0x17
08d4f214 7298f364 mscorlib_ni!System.Threading.ExecutionContext.Run+0x44
08d4f22c 729b8252 mscorlib_ni!System.Threading.ThreadHelper.ThreadStart+0x52
STACK_COMMAND: !c:\symbols\SOS_x86_x86_4.8.4084.00.dll\5DDA3D947b0000\SOS_x86_x86_4.8.4084.00.dll.pe 0xe27f3c4 ; ** Pseudo Context ** ManagedPseudo ** Value: bb49278 ** ; kbSYMBOL_NAME: Esri_ArcGISRuntime!Esri.ArcGISRuntime.ArcGISException.HandleCoreError+26
MODULE_NAME: Esri_ArcGISRuntime
IMAGE_NAME: Esri.ArcGISRuntime.dll
FAILURE_BUCKET_ID: CLR_EXCEPTION_Esri.ArcGISRuntime.ArcGISRuntimeException_80131500_Esri.ArcGISRuntime.dll!Esri.ArcGISRuntime.ArcGISException.HandleCoreError
OS_VERSION: 10.0.19041.1
BUILDLAB_STR: vb_release
OSPLATFORM_TYPE: x86
OSNAME: Windows 10
FAILURE_ID_HASH: {00331d04-ebef-781d-1e3c-e3fe06ba2b78}
Followup: MachineOwner
---------eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=00000003 edi=00000003
eip=77522f6c esp=08d4def0 ebp=08d4e080 iopl=0 nv up ei pl nz ac pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000216
ntdll!NtWaitForMultipleObjects+0xc:
77522f6c c21400 ret 14h
ChildEBP RetAddr Args to Child
08d4deec 768eb623 00000003 08d4e120 00000001 ntdll!NtWaitForMultipleObjects+0xc (FPO: [5,0,0])
08d4e080 768eb508 00000003 08d4e120 00000000 KERNELBASE!WaitForMultipleObjectsEx+0x103 (FPO: [SEH])
08d4e09c 75bd69e6 00000003 08d4e120 00000000 KERNELBASE!WaitForMultipleObjects+0x18 (FPO: [Non-Fpo])
08d4e148 75bd6617 00000000 00000000 08d4e23c kernel32!WerpReportFaultInternal+0x3b7 (FPO: [Non-Fpo])
08d4e164 75babc39 08d4e20c 7698e620 08d4e23c kernel32!WerpReportFault+0x9d (FPO: [Non-Fpo])
08d4e16c 7698e620 08d4e23c 00000001 a0e62eb1 kernel32!BasepReportFault+0x19 (FPO: [Non-Fpo])
08d4e20c 77554883 08d4e23c 77526fc2 08d4ff44 KERNELBASE!UnhandledExceptionFilter+0x290 (FPO: [Non-Fpo])
08d4ff44 77517a4e ffffffff 77538a47 00000000 ntdll!__RtlUserThreadStart+0x3ce34
08d4ff54 00000000 73bc45e0 017b45e8 00000000 ntdll!_RtlUserThreadStart+0x1b (FPO: [Non-Fpo])
Thanks in advance,
Adrian
This is an issue with rendering the data, and unfortunately problematic to catch, as it is happening in the rendering thread. Which version are you using? If not using the latest, do you still see the issue? (A lot of these kind of issues have been fixed)
Hello, dotMorten.
I'm using version 100.11.2 of the SDK. Sorry for not pointing it out at first.
I see I could upgrade to version 100.14.2. Can I just replace the SDK DLLs on the clients, or do I need to also recompile my user control assembly?
Thank you,
Adrian
You'll need to recompile and retest.
I also recommend checking the memory usage while the app is running, since your app is 32-bit you could be near the memory limit (approx. 1-1.2GB). We've often found that to be the cause of issue when the call stack ends in CoreGeoView.Pulse.