AnsweredAssumed Answered

FeatureTable.AddFeatureAsync() throws exception on iOS when running in background

Question asked by jlovely@chacompanies.com on Mar 5, 2019
Latest reply on Mar 18, 2019 by jlovely@chacompanies.com

I'm building a data collection app fairly similar to this sample app (downloaded map for offline work, location tracking, recording survey data at a point location) using Xamarin Forms. It periodically records the user's location, and while that works just fine if the app is in the foreground, while responding to location change events in the background calling FeatureTable.AddFeatureAsync() throws an ArcGISRuntimeException with the message "Some kind of disk I/O error occurred: disk I/O error". The stack trace is:

at Esri.ArcGISRuntime.ArcGISException.HandleCoreError (RuntimeCoreNet.GeneratedWrappers.CoreError error, System.Boolean throwException) [0x00013] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\ArcGISExceptions.cs:75
at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError (System.IntPtr errorHandle, System.Boolean throwOnFailure, System.Runtime.InteropServices.GCHandle wrapperHandle) [0x00025] in C:\daily_r\api_xam\dotnet\api_generated_interop\managed_wrappers\Interop.cs:104
at RuntimeCoreNet.GeneratedWrappers.CoreTask.Get () [0x00019] in C:\daily_r\api_xam\dotnet\api_generated_interop\managed_wrappers\CoreTask.cs:249
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions+TaskCompletedCallbackHandler`1[T].OnCompleted (System.Object sender, System.EventArgs e) [0x00034] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\Internal\CoreTaskExtensions.cs:188
--- End of stack trace from previous location where exception was thrown ---
at (wrapper unknown) System.Object.gsharedvt_out()
at Esri.ArcGISRuntime.Internal.CoreTaskExtensions+TaskCompletedCallbackHandler`1+<CreateInternal>d__7[T].MoveNext () [0x00038] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\Internal\CoreTaskExtensions.cs:173
--- End of stack trace from previous location where exception was thrown ---
at Esri.ArcGISRuntime.Data.FeatureTable+<AddFeatureAsync>d__62.MoveNext () [0x00048] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\Data\FeatureTable.cs:488
--- End of stack trace from previous location where exception was thrown ---
at [redacted].Models.LocationRecorder+<AddFeature>d__16.MoveNext () [0x00074] in [redacted]\Models\LocationRecorder.cs:64

Outcomes