<?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 Re: MapView ObjectDisposedException IOS in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1028655#M9808</link>
    <description>&lt;P&gt;Hi- Can you share how you implemented your custom renderer? I've been scratching my head for an hour or two.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 19:10:22 GMT</pubDate>
    <dc:creator>GlobeRider</dc:creator>
    <dc:date>2021-02-19T19:10:22Z</dc:date>
    <item>
      <title>MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668848#M8425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using nuget Esri.ArcGISRuntime.Xamarin.Forms v. 100.9.0 on Android platform everything works fine, but on IOS i found bug which I was also able to reproduce in a clean project.&lt;/P&gt;&lt;P&gt;It is this exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;- $exception {System.ObjectDisposedException: Cannot access a disposed object.&lt;BR /&gt;Object name: 'MapView'.&lt;BR /&gt; at Foundation.NSObject.get_SuperHandle () [0x0004a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/Foundation/NSObject2.cs:401 &lt;BR /&gt; at UIKit.UIView.get_Bounds () [0x0009d] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIView.g.cs:3114 &lt;BR /&gt; at Esri.ArcGISRuntime.UI.Controls.GeoView.ApplicationDidBecomeActive (System.WeakReference`1&lt;T&gt; geoview) [0x0000d] in &amp;lt;feaa53e84d7043e88504283a2c404a62&amp;gt;:0 &lt;BR /&gt; at Esri.ArcGISRuntime.UI.Controls.GeoView+&amp;lt;&amp;gt;c__DisplayClass47_0.&amp;lt;SetupApplicationNotificationHandlers&amp;gt;b__3 (System.Object s, Foundation.NSNotificationEventArgs e) [0x00000] in &amp;lt;feaa53e84d7043e88504283a2c404a62&amp;gt;:0 &lt;BR /&gt; at UIKit.UIApplication+Notifications+&amp;lt;&amp;gt;c__DisplayClass4_0.&amp;lt;ObserveDidBecomeActive&amp;gt;b__0 (Foundation.NSNotification notification) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.g.cs:2092 &lt;BR /&gt; at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/Foundation/NSNotificationCenter.cs:48 &lt;BR /&gt; at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)&lt;BR /&gt; at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:86 &lt;BR /&gt; at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:65 &lt;BR /&gt; at Ag.App.Phone.Ios.Application.Main (System.String[] args) [0x00001] in C:\devel\App\Source\App.Phone.iOS\Main&lt;/T&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- $exception {System.ObjectDisposedException: Cannot access a disposed object.&lt;BR /&gt;Object name: 'MapView'.&lt;BR /&gt; at Foundation.NSObject.get_SuperHandle () [0x0004a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/Foundation/NSObject2.cs:401 &lt;BR /&gt; at UIKit.UIView.get_Bounds () [0x0009d] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIView.g.cs:3114 &lt;BR /&gt; at Esri.ArcGISRuntime.UI.Controls.GeoView.ApplicationDidBecomeActive (System.WeakReference`1&lt;T&gt; geoview) [0x0000d] in &amp;lt;feaa53e84d7043e88504283a2c404a62&amp;gt;:0 &lt;BR /&gt; at Esri.ArcGISRuntime.UI.Controls.GeoView+&amp;lt;&amp;gt;c__DisplayClass47_0.&amp;lt;SetupApplicationNotificationHandlers&amp;gt;b__3 (System.Object s, Foundation.NSNotificationEventArgs e) [0x00000] in &amp;lt;feaa53e84d7043e88504283a2c404a62&amp;gt;:0 &lt;BR /&gt; at UIKit.UIApplication+Notifications+&amp;lt;&amp;gt;c__DisplayClass4_0.&amp;lt;ObserveDidBecomeActive&amp;gt;b__0 (Foundation.NSNotification notification) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.g.cs:2092 &lt;BR /&gt; at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/Foundation/NSNotificationCenter.cs:48 &lt;BR /&gt; at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)&lt;BR /&gt; at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:86 &lt;BR /&gt; at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/14.0.0.0/src/Xamarin.iOS/UIKit/UIApplication.cs:65 &lt;BR /&gt; at Ag.App.Phone.Ios.Application.Main (System.String[] args) [0x00001] in C:\devel\App\Source\App.Phone.iOS\Main.cs:12 } System.ObjectDisposedException&lt;/T&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception appearing alwayse when i have loaded MapView on current page. Then I go to another page. Then send app to background. Do work and return back to the app. And when app is send from backgroud to foreground it will crash on&amp;nbsp;&lt;EM&gt;System.ObjectDisposedException: Cannot access a disposed object.&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;Object name: 'MapView'&lt;/EM&gt; . On physical device it happen almost everytime on simulator sometimes not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I send app to&amp;nbsp;backgroud&amp;nbsp;and current page is page with&amp;nbsp;MapView&amp;nbsp;it works fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Example in suffix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;T. Zachoval&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2020 12:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668848#M8425</guid>
      <dc:creator>TomášZachoval</dc:creator>
      <dc:date>2020-10-14T12:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668849#M8426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A _jive_internal="true" data-userid="424555" data-username="zachovaltomas" href="https://community.esri.com/people/zachovaltomas" style="color: #8ca9cd; border: 0px; font-weight: 600; font-size: 13.713600158691406px;"&gt;Tomáš&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have exactly the same symtoms with my iOS app.&amp;nbsp;Fixed it with a custom renderer for MapView:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;[assembly: ExportRenderer(typeof(Esri.ArcGISRuntime.Xamarin.Forms.MapView), typeof(MyMapViewRenderer))]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;namespace xxx.Forms.iOS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; public class MyMapViewRenderer : MapViewRenderer&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;protected override bool ManageNativeControlLifetime =&amp;gt; false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;This is enough to make my app work as expected! Maybe this can help you too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Hannes&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2020 08:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668849#M8426</guid>
      <dc:creator>JohannesHoerhan</dc:creator>
      <dc:date>2020-10-28T08:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668850#M8427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Johannes&lt;/P&gt;&lt;P&gt;Your solution works amazing, I am really grateful. Thank you so much for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish you happy coding.&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 12:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/668850#M8427</guid>
      <dc:creator>TomášZachoval</dc:creator>
      <dc:date>2020-10-29T12:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1024695#M9778</link>
      <description>&lt;P&gt;Thank you for the sample app.&amp;nbsp;&lt;BR /&gt;I've been trying to reproduce this with the above provided app. The about page is binding to a Map in the AbouveViewModel, but that property doesn't seem to exist. I added it, so I get a map, and tried navigating around, but not getting the crash.&lt;/P&gt;&lt;P&gt;Do you have an updated sample app with some specific repro steps that demonstrates the problem?&lt;BR /&gt;&lt;BR /&gt;Also we did do some fixes in Update 10, especially around ensuring null-checks, so there's a good chance this issue has been resolved. However I'd like to try and repro in Update 9, just to make sure.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 00:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1024695#M9778</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-02-09T00:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1024703#M9779</link>
      <description>&lt;P&gt;...actually ignore that. I was finally able to reproduce in update 9 and 10.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 00:45:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1024703#M9779</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-02-09T00:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1028655#M9808</link>
      <description>&lt;P&gt;Hi- Can you share how you implemented your custom renderer? I've been scratching my head for an hour or two.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 19:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1028655#M9808</guid>
      <dc:creator>GlobeRider</dc:creator>
      <dc:date>2021-02-19T19:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1028846#M9811</link>
      <description>&lt;P&gt;Hi- I'm able to reproduce using MapView, SceneView and ARSceneView.&amp;nbsp; I've tried adding the map views programmatically and removing them when the OnDisappering event fires, but it still throws an error when navigating away from a page that uses a MapView.&amp;nbsp; I've tried opening as a "modal" and it still crashes it.&amp;nbsp; So, it's seems to be a pretty serious bug (for me at least).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps to reproduce:&lt;/P&gt;&lt;P&gt;1. Open Page with MapView, SceneView or ARSceneView.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Go Back or Close Page&lt;/P&gt;&lt;P&gt;3. Open Another App on Phone. (i.e. Send MapApp to Background)&lt;/P&gt;&lt;P&gt;4. Re-Open MapApp&lt;/P&gt;&lt;P&gt;5. Crash&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Runtime 100.10.0&lt;/P&gt;</description>
      <pubDate>Sat, 20 Feb 2021 14:40:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1028846#M9811</guid>
      <dc:creator>GlobeRider</dc:creator>
      <dc:date>2021-02-20T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1034735#M9866</link>
      <description>&lt;P&gt;Any updates to a fix? I am getting this also in 100.10.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 22:58:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1034735#M9866</guid>
      <dc:creator>RickBobbitt</dc:creator>
      <dc:date>2021-03-09T22:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1039546#M9905</link>
      <description>&lt;P&gt;We've run into this issue ourselves. We'll try the work-around and look forward to a fix in the Runtime.&lt;/P&gt;&lt;P&gt;System.ObjectDisposedException: Cannot access a disposed object.&lt;BR /&gt;Object name: 'MapView'.**&lt;/P&gt;&lt;P&gt;**Stack trace**:&lt;/P&gt;&lt;P&gt;- at Foundation.NSObject.get_SuperHandle ()&lt;BR /&gt;- at UIKit.UIView.get_Bounds ()&lt;BR /&gt;- at Esri.ArcGISRuntime.UI.Controls.GeoView.ApplicationDidBecomeActive (System.WeakReference&amp;lt;T&amp;gt;[T] geoview)&lt;BR /&gt;- at Esri.ArcGISRuntime.UI.Controls.GeoView+&amp;lt;&amp;gt;c__DisplayClass47_0.&amp;lt;SetupApplicationNotificationHandlers&amp;gt;b__3 (System.Object s, Foundation.NSNotificationEventArgs e)&lt;BR /&gt;- at UIKit.UIApplication+Notifications+&amp;lt;&amp;gt;c__DisplayClass4_0.&amp;lt;ObserveDidBecomeActive&amp;gt;b__0 (Foundation.NSNotification notification)&lt;BR /&gt;- at Foundation.InternalNSNotificationHandler.Post (Foundation.NSNotification s)&lt;BR /&gt;- at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)&lt;BR /&gt;- at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate)&lt;BR /&gt;- at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName)&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 22:39:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1039546#M9905</guid>
      <dc:creator>JeremyBridges</dc:creator>
      <dc:date>2021-03-22T22:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: MapView ObjectDisposedException IOS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1043836#M9956</link>
      <description>&lt;P&gt;Just to follow up on this. We'll have a fix for this in Update 11. The above proposed workaround with a renderer is a good way to do it for now - the only downside might be that if you create A LOT of MapView instances, it might leak a bit of memory, but if you're not you should be fine.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 16:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-objectdisposedexception-ios/m-p/1043836#M9956</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-04-05T16:26:32Z</dc:date>
    </item>
  </channel>
</rss>

