[Mono-bugs] [Bug 516960] [PATCH] DataGridView MoveCurrentCell can attempt to access Column index -1

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Apr 28 08:33:26 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=516960

http://bugzilla.novell.com/show_bug.cgi?id=516960#c6


G M <sexxxenator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sexxxenator at gmail.com

--- Comment #6 from G M <sexxxenator at gmail.com> 2010-04-28 12:33:24 UTC ---
This error occurs almost every time I build a DataGrid View with few columns
(~1 to 3). My current code crashes everytime in Mono and never in VC#.
Unfortunately it is too heavy to be sent as-is and I don't have time to send a
test-case. In case it can help in the meantime, the exact exception I get is
(indeed related to MoveCurrentCell):
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: y
  at System.Windows.Forms.DataGridView.MoveCurrentCell (Int32 x, Int32 y,
Boolean select, Boolean isControl, Boolean isShift, Boolean scroll) [0x00593]
in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6311 
  at System.Windows.Forms.DataGridView.OnListPositionChanged (System.Object
sender, System.EventArgs args) [0x00033] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6347 
  at System.Windows.Forms.CurrencyManager.OnPositionChanged (System.EventArgs
e) [0x0000b] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:303 
  at System.Windows.Forms.CurrencyManager.ChangeRecordState (Int32 newPosition,
Boolean validating, Boolean endCurrentEdit, Boolean firePositionChanged,
Boolean pullData) [0x00068] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:354 
  at System.Windows.Forms.CurrencyManager.AddNew () [0x00038] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:190 
  at System.Windows.Forms.DataGridView.OnUserAddedRow
(System.Windows.Forms.DataGridViewRowEventArgs e) [0x0003d] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5132 
  at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore (Int32
columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean
validateCurrentCell, Boolean throughMouseClick) [0x0027f] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:5647 
  at System.Windows.Forms.DataGridView.MoveCurrentCell (Int32 x, Int32 y,
Boolean select, Boolean isControl, Boolean isShift, Boolean scroll) [0x00135]
in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6190 
  at System.Windows.Forms.DataGridView.OnListPositionChanged (System.Object
sender, System.EventArgs args) [0x00033] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6347 
  at System.Windows.Forms.CurrencyManager.OnPositionChanged (System.EventArgs
e) [0x0000b] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:303 
  at System.Windows.Forms.CurrencyManager.ChangeRecordState (Int32 newPosition,
Boolean validating, Boolean endCurrentEdit, Boolean firePositionChanged,
Boolean pullData) [0x00068] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:354 
  at System.Windows.Forms.CurrencyManager.ListChangedHandler (System.Object
sender, System.ComponentModel.ListChangedEventArgs e) [0x000e0] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs:429 
  at
System.ComponentModel.BindingList`1[SMA.Agent.SolarPanel.SolarPanelSensorsValues].OnListChanged
(System.ComponentModel.ListChangedEventArgs e) [0x0000b] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/System/System.ComponentModel/BindingList.cs:253 
  at
System.ComponentModel.BindingList`1[SMA.Agent.SolarPanel.SolarPanelSensorsValues].InsertItem
(Int32 index, SMA.Agent.SolarPanel.SolarPanelSensorsValues item) [0x0001f] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/System/System.ComponentModel/BindingList.cs:241 
  at
System.Collections.ObjectModel.Collection`1[SMA.Agent.SolarPanel.SolarPanelSensorsValues].Add
(SMA.Agent.SolarPanel.SolarPanelSensorsValues item) [0x0000c] in
/usr/obj/i386/mono-2.6.3p17/mono-2.6.3/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:72 
  at SMA.Agent.SolarPanelAgent.OnDataReceivedSocket (System.Object sender,
SMA.Environment.DataReceivedSocketEventArgs args) [0x000ac] in
/home/guillaume/Work/CEA/Code/GangOf3CEA/lima_SOLAIREDUO/SMA/Agent/SolarPanelAgent.cs:122 

For your information: I'm running Mono 2.6.3 under OpenBSD (I know... I
know...)
Mono JIT compiler version 2.6.3 (tarball Mon Apr 12 14:41:35 MDT 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
        GC:            System Boehm (with typed GC)
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none

PS: I think the priority should be raised, since in simple and normal
conditions, the code crashes with an exception that is not expected to occur.

-- 
Configure bugmail: http://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.


More information about the mono-bugs mailing list