ArduPilot / ArduPilot/MissionPlanner

Mono can not edit waypoint table in Flight Planner

Open
#801 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

Using Mission Planner 1.3.19.2, Mono 3.12.0 on Ubuntu 14.04

I can not change the cell values the the waypoint table used in the Flight Planner when running it under Mono. It works correctly on a Windows VM

I can add waypoints onto the map and they are added to the table correctly. If I try change any cell value within the table I get these results.

The first time I make an edit to any cell in the table, the cell is updated with the new value.
The next cell that I try edit behaves badly. When I select the cell, The value disappears from view.
I can try enter a new value but I see nothing in the cell.
When I click into a different cell, the cell I just left reverts to the original value.

Loading Waypoints from file:
When I load a waypoint file the table is created correctly and I can see the waypoints on the map.
If I try edit a cell, I imediatly get a error message box about an index out of range.

Looking at the MissionPlanner.log, I get

"2015-02-17 09:45:01,241 DEBUG Program - System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
Parameter name: index
-1
at System.Collections.ArrayList.ThrowNewArgumentOutOfRangeException (System.String name, System.Object actual, System.String message) [0x00000] in :0
at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in :0
at System.Windows.Forms.DataGridViewCellCollection.GetCellInternal (Int32 colIndex) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.DataGridViewCellCollection:GetCellInternal (int)
at System.Windows.Forms.DataGridView.GetCellInternal (Int32 colIndex, Int32 rowIndex) [0x00000] in :0
at System.Windows.Forms.DataGridView.OnCellLeave (System.Windows.Forms.DataGridViewCellEventArgs e) [0x00000] in :0
at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore (Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick) [0x00000] in :0
at System.Windows.Forms.DataGridView.OnMouseDown (System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
at System.Windows.Forms.Control.WmLButtonDown (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.DataGridView.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0 (:0) [Base Thread]"

And in the Mono Log I get:

"at System.Windows.Forms.dll.NativeWindow.WndProc (IL offset: 0x0)
at System.Windows.Forms.dll.ControlNativeWindow.WndProc (IL offset: 0x0)
at System.Windows.Forms.dll.ControlWindowTarget.OnMessage (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridView.WndProc (IL offset: 0x0)
at System.Windows.Forms.dll.Control.WndProc (IL offset: 0x0)
at System.Windows.Forms.dll.Control.WmLButtonDown (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridView.OnMouseDown (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridView.SetCurrentCellAddressCore (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridView.OnCellLeave (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridView.GetCellInternal (IL offset: 0x0)
at System.Windows.Forms.dll.DataGridViewCellCollection.GetCellInternal (IL offset: 0x0)
at mscorlib.dll.ArrayList.get_Item (IL offset: 0x0)
at mscorlib.dll.ArrayList.ThrowNewArgumentOutOfRangeException (IL offset: 0x0)
Message: Index is less than 0 or more than or equal to the list count.
Parameter name: index
-1"

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Flight Planner waypoint-table editing and file-loading workflows in Mission Planner 1.3.19.2 under Mono 3.12.0 on Ubuntu 14.04. Use the MissionPlanner.log and Mono stack traces, especially the DataGridView OnCellLeave path, to investigate the negative-index failure. Done means cells can be edited repeatedly and after loading a waypoint file without reverting values or showing an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux, ubuntu
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.