[Mono-bugs] [Bug 472968] DataGridView. Crash when adding Row at 0 and Rows is empty

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 5 13:06:13 EST 2009


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

User mcarrion at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=472968#c4





--- Comment #4 from Mario Carrion <mcarrion at novell.com>  2009-02-05 11:06:13 MST ---
Created an attachment (id=270536)
 --> (https://bugzilla.novell.com/attachment.cgi?id=270536)
Patch

However with this patch, I got the following exception after OnPaint, so I'm
sure I'm missing something really important.

mario at malakarma:~/trashme> gmcs -r:System,System.Windows.Forms,System.Drawing
dgrid1.cs && mono --debug dgrid1.exe 
System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal
to the list count.
Parameter name: index
2
  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.DataGridViewRow.GetState (Int32 rowIndex) [0x0004c]
in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewRow.cs:445 
  at System.Windows.Forms.DataGridView.OnPaint
(System.Windows.Forms.PaintEventArgs e) [0x0036c] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:4583 
  at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m)
[0x0008a] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5561 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m)
[0x0016c] in
/home/mario/repository/mcarrion/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5319 
  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:5521 
  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.


More information about the mono-bugs mailing list