<?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: Crash with NmeaLocationDataSource in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179088#M11041</link>
    <description>&lt;P&gt;Here is what is in the AppCenter Diagnostics:&lt;/P&gt;&lt;DIV class=""&gt;&lt;BLOCKQUOTE&gt;&lt;H4&gt;Application.Main (System.String[] args)&lt;/H4&gt;&lt;H4&gt;/Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs, line 15&lt;/H4&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class=""&gt;SIGABRT: Could not initialize an instance of the type 'ExternalAccessory.EASession': the native 'initWithAccessory:forProtocol:' method returned nil. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line 15 is just the startup:&amp;nbsp; &amp;nbsp;UIApplication.Main(args, null, typeof(AppDelegate));&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;Stack traces&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:609&lt;BR /&gt;/Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/ExternalAccessory/EASession.g.cs:79&lt;BR /&gt;Esri.ArcGISRuntime.Location.NmeaLocationDataSource+EAAccessoryStream..ctor (ExternalAccessory.EAAccessory accessory, System.String protocol) [0x0000d] in &amp;lt;fc2ff9f8183b4871b39c22ae8fb2d60c&amp;gt;:0&lt;BR /&gt;NmeaLocationDataSource+&amp;lt;&amp;gt;c__DisplayClass33_0.&amp;lt;FromAccessory&amp;gt;b__0 (Esri.ArcGISRuntime.Location.NmeaLocationDataSource d)&lt;BR /&gt;NmeaLocationDataSource+CreateStreamNmeaLocationDataSource.OnStartAsync ()&lt;BR /&gt;ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException)&lt;BR /&gt;Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle)&lt;BR /&gt;CoreTask.Get ()&lt;BR /&gt;CoreTaskExtensions+TaskCompletedCallbackHandler.OnCompleted (System.Object sender, System.EventArgs e)&lt;BR /&gt;CoreTaskExtensions+TaskCompletedCallbackHandler.CreateInternal (RuntimeCoreNet.GeneratedWrappers.CoreTask task, System.Threading.CancellationToken cancellationToken)&lt;BR /&gt;MapViewControl.SetupLocationDataSource ()&lt;BR /&gt;AsyncMethodBuilderCore+&amp;lt;&amp;gt;c.&amp;lt;ThrowAsync&amp;gt;b__7_0 (System.Object state) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021&lt;BR /&gt;NSAsyncSynchronizationContextDispatcher.Apply () /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSAction.cs:178&lt;BR /&gt;(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)&lt;BR /&gt;UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:85&lt;BR /&gt;Application.Main (System.String[] args) /Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs:15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at it I do see a place that I could catch an exception I had not noticed before.&amp;nbsp; But one thing that really confuses me is the user reporting that this has occurred once they have connected and have collected a point.&amp;nbsp; The initialization of the LocationDataSource is done when the MapView is initially loaded.&amp;nbsp; So I am not clear how there would be an additional attempt to connect (and there is always the chance the user who reported things is describing something incorrectly).&amp;nbsp; It is not an issue that occurs often, it may have only happened on one day.&amp;nbsp; The device is a Geneq SxBlue.&amp;nbsp; We have 100 users with the exact same device in the field&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 17:08:02 GMT</pubDate>
    <dc:creator>JoeHershman</dc:creator>
    <dc:date>2022-06-01T17:08:02Z</dc:date>
    <item>
      <title>Crash with NmeaLocationDataSource</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1178697#M11035</link>
      <description>&lt;P&gt;Hi, [lets try and write this a second time after GeoNet failed]&lt;/P&gt;&lt;P&gt;We switched over to the&amp;nbsp;NmeaLocationDataSource from our own custom LocationDataSource for collecting from an external iOS device.&amp;nbsp; Been working great and removed a lot of custom code&lt;/P&gt;&lt;P&gt;But we have gotten a system crash when using the&amp;nbsp;NmeaLocationDataSource.&amp;nbsp; It has happened both when making initial connection to the unit and once the user is already collecting GPS data.&amp;nbsp; When it happens while collecting data the user does say they see the LastKnown location indicator (the grey dot).&amp;nbsp; The stack trace shows occurring in&amp;nbsp;OnStartAsync.&amp;nbsp; So not sure if it tries to call this again when the connection is dropped.&amp;nbsp; It seems to me to be an issue with the actual connection between the unit and the iOS device, but possibly is a result of the unit not receiving good data&lt;/P&gt;&lt;P&gt;As much as anything it would be nice to be able to catch the exception so it does not crash the application but I cannot seem to find where one would handle the exception&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/464411"&gt;@SomeGISGuy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stack trace from crash&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:609
/Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/ExternalAccessory/EASession.g.cs:79
Esri.ArcGISRuntime.Location.NmeaLocationDataSource+EAAccessoryStream..ctor (ExternalAccessory.EAAccessory accessory, System.String protocol) [0x0000d] in &amp;lt;fc2ff9f8183b4871b39c22ae8fb2d60c&amp;gt;:0
NmeaLocationDataSource+&amp;lt;&amp;gt;c__DisplayClass33_0.&amp;lt;FromAccessory&amp;gt;b__0 (Esri.ArcGISRuntime.Location.NmeaLocationDataSource d)
NmeaLocationDataSource+CreateStreamNmeaLocationDataSource.OnStartAsync ()
ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 17:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1178697#M11035</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2022-05-31T17:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Crash with NmeaLocationDataSource</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179048#M11039</link>
      <description>&lt;P&gt;Thank you for the stack trace, but what is the exception that is thrown? What device is being used?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 16:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179048#M11039</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2022-06-01T16:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Crash with NmeaLocationDataSource</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179088#M11041</link>
      <description>&lt;P&gt;Here is what is in the AppCenter Diagnostics:&lt;/P&gt;&lt;DIV class=""&gt;&lt;BLOCKQUOTE&gt;&lt;H4&gt;Application.Main (System.String[] args)&lt;/H4&gt;&lt;H4&gt;/Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs, line 15&lt;/H4&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class=""&gt;SIGABRT: Could not initialize an instance of the type 'ExternalAccessory.EASession': the native 'initWithAccessory:forProtocol:' method returned nil. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line 15 is just the startup:&amp;nbsp; &amp;nbsp;UIApplication.Main(args, null, typeof(AppDelegate));&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;Stack traces&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:609&lt;BR /&gt;/Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/ExternalAccessory/EASession.g.cs:79&lt;BR /&gt;Esri.ArcGISRuntime.Location.NmeaLocationDataSource+EAAccessoryStream..ctor (ExternalAccessory.EAAccessory accessory, System.String protocol) [0x0000d] in &amp;lt;fc2ff9f8183b4871b39c22ae8fb2d60c&amp;gt;:0&lt;BR /&gt;NmeaLocationDataSource+&amp;lt;&amp;gt;c__DisplayClass33_0.&amp;lt;FromAccessory&amp;gt;b__0 (Esri.ArcGISRuntime.Location.NmeaLocationDataSource d)&lt;BR /&gt;NmeaLocationDataSource+CreateStreamNmeaLocationDataSource.OnStartAsync ()&lt;BR /&gt;ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException)&lt;BR /&gt;Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle)&lt;BR /&gt;CoreTask.Get ()&lt;BR /&gt;CoreTaskExtensions+TaskCompletedCallbackHandler.OnCompleted (System.Object sender, System.EventArgs e)&lt;BR /&gt;CoreTaskExtensions+TaskCompletedCallbackHandler.CreateInternal (RuntimeCoreNet.GeneratedWrappers.CoreTask task, System.Threading.CancellationToken cancellationToken)&lt;BR /&gt;MapViewControl.SetupLocationDataSource ()&lt;BR /&gt;AsyncMethodBuilderCore+&amp;lt;&amp;gt;c.&amp;lt;ThrowAsync&amp;gt;b__7_0 (System.Object state) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021&lt;BR /&gt;NSAsyncSynchronizationContextDispatcher.Apply () /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSAction.cs:178&lt;BR /&gt;(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)&lt;BR /&gt;UIApplication.Main (System.String[] args, System.Type principalClass, System.Type delegateClass) /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:85&lt;BR /&gt;Application.Main (System.String[] args) /Users/runner/work/1/s/src/Mobile.Design.iOS/Main.cs:15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at it I do see a place that I could catch an exception I had not noticed before.&amp;nbsp; But one thing that really confuses me is the user reporting that this has occurred once they have connected and have collected a point.&amp;nbsp; The initialization of the LocationDataSource is done when the MapView is initially loaded.&amp;nbsp; So I am not clear how there would be an additional attempt to connect (and there is always the chance the user who reported things is describing something incorrectly).&amp;nbsp; It is not an issue that occurs often, it may have only happened on one day.&amp;nbsp; The device is a Geneq SxBlue.&amp;nbsp; We have 100 users with the exact same device in the field&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 17:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179088#M11041</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2022-06-01T17:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Crash with NmeaLocationDataSource</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179150#M11042</link>
      <description>&lt;P&gt;Thanks. I'm assuming you're already try-catching the `nmeadatasource.StartAsync()` call? You should expect this to fail for a number of reasons (user denies access, device couldn't connect etc).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 18:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/crash-with-nmealocationdatasource/m-p/1179150#M11042</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2022-06-01T18:49:05Z</dc:date>
    </item>
  </channel>
</rss>

