1
Vote

Error EOF

description

Hello,

CodeBase: file:///C:/Users/me/Desktop/SRecordizer1.1b2/SRecordizer.exe
(Running with admin rights under W7-64 pro)

When some spaces are added at the end of a file (original S19 file generated by a Data I/O programmer), the parsing issued an error and after the validation check function was applied, generated several exceptions.

Start with a first popup, tittle: "Trapped Application Exception!", description: "Error reading S19 data!"
After acknoledge, the main screen display correctly the loaded file (was a 64k dump, using S0, S1 & S9 only)

Going to the last erroneous row:
The row displays just "Sx=Unknown", "Size=00", "Address=ERR", Data field is empty and "Csum=00"
A clic in the empty data field produced the following error when trying to get out this field without entering any data (letting him untouched):

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at SRecordizer.Objects.S19Line.CreateRawLine()
at SRecordizer.Objects.S19Line.ToString()
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0, Object arg1)
at BrightIdeasSoftware.Munger.ReportPutValueException(MungerException ex)
at BrightIdeasSoftware.Munger.PutValue(Object target, Object value)
at BrightIdeasSoftware.OLVColumn.PutAspectByName(Object rowObject, Object newValue)
at BrightIdeasSoftware.OLVColumn.PutValue(Object rowObject, Object newValue)
at BrightIdeasSoftware.ObjectListView.FinishCellEdit()
at BrightIdeasSoftware.ObjectListView.PossibleFinishCellEditing()
at BrightIdeasSoftware.ObjectListView.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)

Filling some data will avoid the exception but of course produced another popup telling that the checksum cannot be calculated (expected as some fields are still incorrect)

Next, clicking on the validation check button produced another exception:
(Even if not going to the last row)

************** Exception Text **************
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'FastObjectListView'.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.ListView.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at BrightIdeasSoftware.NativeMethods.GetHeaderControl(ListView list)
at BrightIdeasSoftware.NativeMethods.SetColumnImage(ListView list, Int32 columnIndex, SortOrder order, Int32 imageIndex)
at BrightIdeasSoftware.ObjectListView.ShowSortIndicator(OLVColumn columnToSort, SortOrder sortOrder)
at BrightIdeasSoftware.ObjectListView.ShowSortIndicator()
at BrightIdeasSoftware.ObjectListView.ChangeToFilteredColumns(View view)
at BrightIdeasSoftware.ObjectListView.RebuildColumns()
at SRecordizer.SRecordView.ToggleAscii()
at SRecordizer.SRecordizer.asciiTsButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.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.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.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)

Of course, all of that will not happen if each line of the file contains only Sx lines without extra lines as it's often the case when using real programmer. I suggest that the parser should ignore each line not starting with a "S" character, but keep signaling that the line is incorrect.

Kind regards,
Alpha01

comments

Alpha01 wrote Mar 30 at 1:02 PM

Added:

When I tried to delete the last (erroneous) row using the "delete selected row" button, I got the following exception...

************** Exception Text **************
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.Collections.Generic.List`1.RemoveAt(Int32 index)
at SRecordizer.Objects.S19.DeleteRow(Int32 rowNum)
at SRecordizer.SRecordView.DeleteRow()
at SRecordizer.SRecordizer.deleteRowTsButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.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.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.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)

It seems that that the bad row was not counted, even if present on the list view...

Kind regards,
Alpha