<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AccessViolationException when calling SceneView.ImageOverlays.Clear() in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1396388#M12571</link>
    <description>&lt;P&gt;.NET Maps SDK version 200.3.0&lt;/P&gt;&lt;P&gt;I have a fairly complex application that uses multiple ImageOverlays to render video frames on a 3D SceneView.&lt;/P&gt;&lt;P&gt;When I want to disable the display of the video, I call SceneView.ImageOverlays.Clear()&lt;/P&gt;&lt;P&gt;If there is only 1 or 2 ImageOverlays then this will usually work.&lt;/P&gt;&lt;P&gt;If there are 4 ImageOverlays then this will 100% throw the following exception:&lt;/P&gt;&lt;P&gt;Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;BR /&gt;at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.CoreRT_GeoView_pulse(IntPtr thisHandle, IntPtr* outErrorHandle)&lt;BR /&gt;at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()&lt;BR /&gt;at Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()&lt;BR /&gt;at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)&lt;BR /&gt;at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)&lt;BR /&gt;at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)&lt;BR /&gt;at System.Windows.Threading.DispatcherOperation.InvokeImpl()&lt;BR /&gt;at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)&lt;BR /&gt;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at System.Windows.Threading.DispatcherOperation.Invoke()&lt;BR /&gt;at System.Windows.Threading.Dispatcher.ProcessQueue()&lt;BR /&gt;at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;BR /&gt;at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;BR /&gt;at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)&lt;BR /&gt;at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)&lt;BR /&gt;at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)&lt;BR /&gt;at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)&lt;BR /&gt;at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)&lt;BR /&gt;at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)&lt;BR /&gt;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at System.Threading.ThreadHelper.ThreadStart(Object obj)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am assuming that there is some non thread safe processing that is occurring to update the map and it is not handling the ImageOverlays collection being cleared while this is happening?&lt;/P&gt;&lt;P&gt;Any help or advice would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2024 02:18:28 GMT</pubDate>
    <dc:creator>AndrewWilcockson</dc:creator>
    <dc:date>2024-03-15T02:18:28Z</dc:date>
    <item>
      <title>AccessViolationException when calling SceneView.ImageOverlays.Clear()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1396388#M12571</link>
      <description>&lt;P&gt;.NET Maps SDK version 200.3.0&lt;/P&gt;&lt;P&gt;I have a fairly complex application that uses multiple ImageOverlays to render video frames on a 3D SceneView.&lt;/P&gt;&lt;P&gt;When I want to disable the display of the video, I call SceneView.ImageOverlays.Clear()&lt;/P&gt;&lt;P&gt;If there is only 1 or 2 ImageOverlays then this will usually work.&lt;/P&gt;&lt;P&gt;If there are 4 ImageOverlays then this will 100% throw the following exception:&lt;/P&gt;&lt;P&gt;Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;BR /&gt;at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.CoreRT_GeoView_pulse(IntPtr thisHandle, IntPtr* outErrorHandle)&lt;BR /&gt;at RuntimeCoreNet.GeneratedWrappers.CoreGeoView.Pulse()&lt;BR /&gt;at Esri.ArcGISRuntime.UI.Controls.GeoView.Esri.ArcGISRuntime.Internal.IDxSurfaceSource.Pulse()&lt;BR /&gt;at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.CompositionTarget_Rendering(Object sender, EventArgs e)&lt;BR /&gt;at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)&lt;BR /&gt;at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)&lt;BR /&gt;at System.Windows.Threading.DispatcherOperation.InvokeImpl()&lt;BR /&gt;at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)&lt;BR /&gt;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at System.Windows.Threading.DispatcherOperation.Invoke()&lt;BR /&gt;at System.Windows.Threading.Dispatcher.ProcessQueue()&lt;BR /&gt;at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;BR /&gt;at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled)&lt;BR /&gt;at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)&lt;BR /&gt;at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)&lt;BR /&gt;at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)&lt;BR /&gt;at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)&lt;BR /&gt;at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp;amp; msg)&lt;BR /&gt;at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)&lt;BR /&gt;at Esri.ArcGISRuntime.Internal.HostedSurfaceElement.SurfaceBackgroundUiWorker(Object arg)&lt;BR /&gt;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;BR /&gt;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR /&gt;at System.Threading.ThreadHelper.ThreadStart(Object obj)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am assuming that there is some non thread safe processing that is occurring to update the map and it is not handling the ImageOverlays collection being cleared while this is happening?&lt;/P&gt;&lt;P&gt;Any help or advice would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 02:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1396388#M12571</guid>
      <dc:creator>AndrewWilcockson</dc:creator>
      <dc:date>2024-03-15T02:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException when calling SceneView.ImageOverlays.Clear()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1396872#M12572</link>
      <description>&lt;P&gt;Is your app x64 or x86?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 23:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1396872#M12572</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2024-03-15T23:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException when calling SceneView.ImageOverlays.Clear()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1397083#M12574</link>
      <description>&lt;P&gt;x64&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 00:41:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1397083#M12574</guid>
      <dc:creator>AndrewWilcockson</dc:creator>
      <dc:date>2024-03-18T00:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException when calling SceneView.ImageOverlays.Clear()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1513785#M12921</link>
      <description>&lt;P&gt;Good news!&amp;nbsp; ArcGIS Maps SDK version 200.5.0 was just released today and this issue is fixed with this release.&lt;/P&gt;&lt;P&gt;Thank you for bringing this one to our attention!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 17:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/accessviolationexception-when-calling-sceneview/m-p/1513785#M12921</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2024-08-01T17:19:33Z</dc:date>
    </item>
  </channel>
</rss>

