CUAHSI / CUAHSI/HydroDesktop

Unhandled Exception

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
CodePlex
Dominant language
C#
Stars
76
Forks
21
PR merge metrics
No merged PRs in 30d

Description

dtarb[CodePlex]
Version: 1.5.10.1
Description: I was attempting to select a feature to use in search. The feature being selected was created from the buffer tool, but is defective because it has no records in the dbf file of the shapefile. The root cause of this problem is the buffer tool
not adding records to the dbf file.
Error: System.IndexOutOfRangeException: There is no row at position 0.
at System.Data.RBTree1.GetNodeByIndex(Int32 userIndex)
at DotSpatial.Data.PolygonShapefile.GetFeature(Int32 index)
at DotSpatial.Symbology.IndexSelection.ToFeatureList()
at Search3.SearchPlugin.Map_SelectionChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at DotSpatial.Controls.Map.OnSelectionChanged()
at DotSpatial.Controls.Map.MapFrame_SelectionChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at DotSpatial.Symbology.Layer.OnSelectionChanged()
at DotSpatial.Symbology.Group.collection_SelectionChanged(Object sender, EventArgs e)

at DotSpatial.Symbology.LayerEventList1.OnSelectionChanged()
at DotSpatial.Symbology.LayerEventList`1.SelectableSelectionChanged(Object sender, EventArgs e)

at DotSpatial.Symbology.Layer.OnSelectionChanged()
at DotSpatial.Symbology.FeatureLayer.SelectedFeaturesChanged(Object sender, EventArgs e)

at DotSpatial.Symbology.Changeable.OnChanged()
at DotSpatial.Symbology.Changeable.ResumeChanges()
at DotSpatial.Symbology.IndexSelection.AddRegion(IEnvelope region, IEnvelopeamp affectedArea)

at DotSpatial.Symbology.FeatureLayer.Select(IEnvelope tolerant, IEnvelope strict, SelectionMode selectionMode, IEnvelopeamp affectedArea)

at DotSpatial.Symbology.Group.Select(IEnvelope tolerant, IEnvelope strict, SelectionMode mode, IEnvelopeamp affectedArea)

at DotSpatial.Controls.Map.Select(IEnvelope tolerant, IEnvelope strict, SelectionMode mode, IEnvelopeamp affectedArea)

at DotSpatial.Controls.MapFunctionSelect.HandleSelection(IEnvelope tolerant, IEnvelope strict)

at DotSpatial.Controls.MapFunctionSelect.OnMouseUp(GeoMouseArgs e)
at DotSpatial.Controls.MapFunction.DoMouseUp(GeoMouseArgs e)
at DotSpatial.Controls.Map.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Messageamp m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Messageamp m)
at System.Windows.Forms.ScrollableControl.WndProc(Messageamp m)
at System.Windows.Forms.UserControl.WndProc(Messageamp m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Messageamp m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Messageamp m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the buffer tool output and the selection path through PolygonShapefile.GetFeature, IndexSelection.ToFeatureList, and SearchPlugin.Map_SelectionChanged. Reproduce a buffer feature with no DBF records and verify that selecting it no longer raises IndexOutOfRangeException and that the DBF contains the required records.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.