I am experiencing a problem with the FeatureTable.QueryAsync method that is proving very difficult to troubleshoot. I am using the SpatialQueryFilter to find all features that intersect a geometry, and *occasionally*, the QueryAsync method throws a super generic exception. There are certain areas that seem to be more problematic but I cannot pin down anything specific about the data there, and some geometries return results without error. Has anyone seen this or have any tips for troubleshooting an issue like this?
My code:
// find correct feature table:
FeatureTable targetTable = null;
IEnumerable<FeatureTable> matchTables = _defaultGDB.FeatureTables.Where(table => table.Name.Equals(_parcelTableName, StringComparison.OrdinalIgnoreCase));
if (matchTables.Count() > 0)
{
targetTable = matchTables.First();
}
else {
throw new Exception("The default query table could not be found.");
}
}
// Define a spatial query
var filter = new Esri.ArcGISRuntime.Data.SpatialQueryFilter();
filter.Geometry = GeometryEngine.Project(geom, targetTable.SpatialReference);
filter.SpatialRelationship = SpatialRelationship.Intersects;
// Execute the query and await results
var results = await targetTable.QueryAsync(filter);And my exception:
System.Exception was caught HResult=-2146233088 Message=Internal error exception Source=Esri.ArcGISRuntime StackTrace: at RuntimeCoreNet.Interop.HandleException(Boolean retVal) at RuntimeCoreNet.CoreFeatureSource.Query(CoreQueryFilter queryFilter) at Esri.ArcGISRuntime.Data.ArcGISFeatureTable.<>c__DisplayClass24.<QueryAsync>b__23() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- |