Bug 5511 - Datagrid crashes in sample code while clicking 'back' arrow
Summary: Datagrid crashes in sample code while clicking 'back' arrow
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: unspecified
Hardware: Other All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-06-04 07:51 UTC by Robert Wilkens
Modified: 2012-07-21 16:48 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Robert Wilkens 2012-06-04 07:51:02 UTC
Description of Problem:
This was found while trying to reproduce 5510, this is yet another crash.

The stacktrace looks like this:


System.InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Data.DataColumnPropertyDescriptor.GetValue (System.Object component) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGridColumnStyle.GetColumnValueAtRow (System.Windows.Forms.CurrencyManager source, Int32 rowNum) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGridTextBoxColumn.GetFormattedValue (System.Windows.Forms.CurrencyManager source, Int32 rowNum) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGridTextBoxColumn.Edit (System.Windows.Forms.CurrencyManager source, Int32 rowNum, Rectangle bounds, Boolean readOnly, System.String displayText, Boolean cellIsVisible) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.Edit () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.ScrollToColumnInPixels (Int32 pixel) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.EnsureCellVisibility (DataGridCell cell) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.set_CurrentCell (DataGridCell value) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.NavigateBack () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.DataGrid.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0 
[mono] ~ @ 


Steps to reproduce the problem:
1. Run sample code from https://bugzilla.novell.com/show_bug.cgi?id=MONO79788
2. To get this far apply patch to mono first from https://bugzilla.xamarin.com/show_bug.cgi?id=5487 
3. While running :
         -Click +
         -Click PC
         -Click Back Arrow on top right
         (crash immediately follows)


Actual Results:
Crash

Expected Results:
Anything but a crash

How often does this happen? 
Every time

Additional Information:
Comment 1 Robert Wilkens 2012-06-04 11:03:14 UTC
I've got a fix for this, and have fixed several side issues in the process, all relating to navigating forward and navigating back.

Will submit to github after code cleanup and testing done.
Comment 2 Robert Wilkens 2012-07-21 16:48:17 UTC
The fix for this was merged with p.r. 335.