gerhardol / apply-routes

Automatically exported from code.google.com/p/apply-routes
0 stars 0 forks source link

Exception when joining activities without laps #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
All activities do not have laps, for instance GPX activities.
Joining activities will therefore fail with the exception below.

Edit/JoinActivitiesAction.cs
Tries to use Lap[0] and "activity.Laps.Count > 0" without checking if lap
!= null.
(The check for Count>0 should be handled in ST...)

------------------
ApplyRoutes
    Assembly Version: 0.1.3651.34266
    Win32 Version: 0.1.3651.34266

System.ArgumentOutOfRangeException: Index was out of range. Must be
non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument
argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at ZoneFiveSoftware.Common.Data.ObservableCollection`1.get_Item(Int32 index)
   at ZoneFiveSoftware.SportTracks.Data.ActivityLaps.get_Item(Int32 index)
   at ApplyRoutesPlugin.Edit.JoinActivitiesAction.Run(Rectangle rectButton)
   at
ZoneFiveSoftware.SportTracks.Actions.ActionMenuAction.popupItem_Select(Object
sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Original issue reported on code.google.com by gerhard....@gmail.com on 10 Jan 2010 at 11:05

GoogleCodeExporter commented 9 years ago
Issue 12 has been merged into this issue.

Original comment by mark...@gmail.com on 21 Mar 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Fixed by r93. Please try out 0.1.3731 from the (google code) downloads page.

Original comment by mark...@gmail.com on 21 Mar 2010 at 2:29