https://bugzilla.novell.com/show_bug.cgi?id=468110


           Summary: DataGridView. Crash when adding Columns
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
            Blocks: 428870
          Found By: Beta-Customer


Created an attachment (id=266660)
 --> (https://bugzilla.novell.com/attachment.cgi?id=266660)
Example

1. Compile attached code
2. Run
3. Crash.

Expected:

No crash, see the attached image.

In .NET you will see an empty row. The output is the following:

 ma...@malakarma:~/Documents/Windows> gmcs
-r:System.Windows.Forms,System.Drawing,System.Data,System Program.cs
-out:FormTest.exe && mono --debug FormTest.exe 
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
/home/mario/repository/mcarrion/mcs/class/corlib/System.Collections/ArrayList.cs:3258
 
  at System.Collections.ArrayList.get_Item (Int32 index) [0x00013] in
/home/mario/repository/mcarrion/mcs/class/corlib/System.Collections/ArrayList.cs:2649
 
  at System.Windows.Forms.DataGridViewRowCollection.get_Item (Int32 index)
[0x00000] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRowCollection.cs:82
 
  at System.Windows.Forms.DataGridView.OnUserAddedRow
(System.Windows.Forms.DataGridViewRowEventArgs e) [0x0005f] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:4933
 
  at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore (Int32
columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean
validateCurrentCell, Boolean throughMouseClick) [0x00252] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5439
 
  at System.Windows.Forms.DataGridView.MoveCurrentCell (Int32 x, Int32 y,
Boolean select, Boolean isControl, Boolean isShift, Boolean scroll) [0x00014]
in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5931
 
  at System.Windows.Forms.DataGridView.OnHandleCreated (System.EventArgs e)
[0x00034] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:3968
 
  at System.Windows.Forms.Control.WmCreate (System.Windows.Forms.Message& m)
[0x00000] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5759
 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x001e4] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5397
 
  at System.Windows.Forms.DataGridView.WndProc (System.Windows.Forms.Message&
m) [0x00000] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5507
 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage
(System.Windows.Forms.Message& m) [0x00000] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:234
 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
(System.Windows.Forms.Message& m) [0x00000] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:215
 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr
wParam, IntPtr lParam) [0x00085] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:242

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to