Hello, I have a problem I'm hoping to get some help with.
This is my base map, and this is the layer I want to load as feature layers.
There's something special about some of the layers found here, for some reason, a lot of them throw this error when they reach this external call "RuntimeCoreNet.CoreFeatureSourceNativeMethods.CoreFeatureSource_Create(...)" to "RuntimeCoreNETDesktop.dll".
Now this call originates from "Esri.ArcGISRuntime.Controls.ViewBase.AddInitializedLayerToViewAsync(...)" when it tries to "CreateCoreLayerInternal(...)"
For example here's the error for layer #44
18:15:22:8706 EsriMap (Error): 'http://utility.arcgis.com/usrsvcs/servers/5ac4e87c0f1e4a429e258532cc9d98d8/rest/services/USA_Demogra...' Layer could not be added to Map because creation of the core layer failed. See InnerException for more information.
Exception:
System.Exception: SQL error or missing database :
at RuntimeCoreNet.Interop.HandleException(Boolean retVal) in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\fc\36386527\Interop.cs:line 24
at Esri.ArcGISRuntime.Data.ServiceFeatureTable.CreateFeatureSource(SpatialReference sr_override) in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\09\02d92b9d\ServiceFeatureTable.cs:line 641
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Layers.FeatureLayer.<CreateCoreLayerAsync>d__5.MoveNext() in C:\Users\******\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\b7\feb17b6f\FeatureLayer.cs:line 429
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Layers.Layer.<CreateCoreLayerInternal>d__5.MoveNext() in C:\Users\*****\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\13\a04ade1a\Layer.cs:line 412
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Esri.ArcGISRuntime.Controls.ViewBase.<AddInitializedLayerToViewAsync>d__9.MoveNext() in C:\Users\*****\AppData\Local\JetBrains\Shared\v08\DecompilerCache\decompiler\D213313B-6D49-4D97-B6BE-4C90E70857F6\20\8bcb57c8\ViewBase.cs:line 695
If I load them as dynamic instead of feature layers, then everything works fine, but if I try to load them as feature layers then I get the error above.
I'm not sure what's going on, but other feature layers work just fine - for example: USA Demography, Traffic - with the exact same code, it's only this specific set of layers that seem to be problematic - and slows my application to a halt for a good minute when it's trying to load the map with all those feature layer errors being thrown -.
Is there anything special about these layers that might be causing this problem? just wondering how come the same code works fine for many other feature layers, but not these.
Thank you for reporting this issue. You seem to be working with v10.2.x, is that right? I'm also able to reproduce in v100.1. We'll be looking into this and let you know if there's any available workaround.
Thanks.
The problem seems to be with the number of fields these services have. Alternatively, you can add the layer as `ArcGISDynamicMapServiceLayer` if using v10.2.x or as `ArcGISMapImageLayer` if using v100.x. What operation are you looking to perform on the layer or features? If in v10.2.x, you can probably use QueryTask to workaround the issue that table cannot be created or loaded.
Hi Jennifer,
You are right I'm using 10.2.7.0, I'm currently falling back to loading these layers as dynamic. I was just wondering If I was loading or setting them up wrong or if there's really an issue with the ArcGISRuntime or the layers themselves. So you can confirm that this is an issue with the ArcGISRuntime v10.2.7.0 ?
Thanks for your understanding.
Hi Sam,
Yes, this is the current limitation - we seem to be hitting this limit: https://sqlite.org/limits.html so you weren't setting up anything wrong. Thanks for your feedback. I've logged in an issue for the team to consider.
default setting for SQLITE_MAX_COLUMN is 2000
Hi,
In the recent v100.2 release we improved to error message in this scenario to tell you that the table has too many fields (exceeds the current 2000 limit).
Please download the latest Visual Studio extension from ArcGIS for Developers or update your NuGet packages via the NuGet package manager.
Cheers
Mike