Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Crash in UndoManager (Read 4384 times)
Necroman
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 49
Joined: Jul 27th, 2009
Crash in UndoManager
Sep 15th, 2009 at 8:33am
Print Post  
this happened to me today:
UndoManager History.Capacity is set to 30.

Code
Select All
"Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   at MindFusion.Diagramming.TableNode.RowCollection.get_Item(Int32 index)
   at MindFusion.Diagramming.TableNode.x82dfc06fddeef289(Int32 xa806b754814b9ae0, Int32 xf0476e906b9d9af4, Boolean x86f283d396b4d73c, RectangleF& xc6aa8d689752bed6)
   at MindFusion.Diagramming.TableNode.GetSpannedCellRect(Int32 row, Int32 col)
   at MindFusion.Diagramming.TableNode.x82dfc06fddeef289(Cell xe6de5e5fa2d44af5)
   at MindFusion.Diagramming.TableNode.Cell.x070dff02744c711e()
   at MindFusion.Diagramming.TableNode.x541a631ae8b4bd87()
   at MindFusion.Diagramming.TableNode.x69e7e7f794373897(xae79ba7265cba94d xa17c9656698d5114)
   at MindFusion.Diagramming.Commands.RedimTableCmd.Undo()
   at MindFusion.Diagramming.Commands.CompositeCmd.Undo()
   at MindFusion.Diagramming.CommandHistory.xc411ac8d6adbe651()
   at MindFusion.Diagramming.UndoManager.Undo()
 


It might be related tothis topic.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Crash in UndoManager
Reply #1 - Sep 15th, 2009 at 10:03am
Print Post  
Are you using cells that span multiple rows (RowSpan > 1)?
  
Back to top
 
IP Logged
 
Necroman
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 49
Joined: Jul 27th, 2009
Re: Crash in UndoManager
Reply #2 - Sep 16th, 2009 at 9:34am
Print Post  
Yes, I use them for defining subsections in TableNodes.

Also this happened to me today after this update (tableNode.Rows.RemoveAt(pos)Wink in one tableNode:
Code
Select All
   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   at MindFusion.Diagramming.TableNode.RowCollection.get_Item(Int32 index)
   at MindFusion.Diagramming.TableNode.x92dd3bdbfcc3d333(IGraphics x41347a961b838962, Pen x6bbc908355c90c11, Brush x03bd6f528805a66d, RectangleF xa6236fc5cd405c4e, RenderOptions xdfde339da46db651)
   at MindFusion.Diagramming.TableNode.Draw(IGraphics graphics, RenderOptions options)
   at MindFusion.Diagramming.Diagram.x83e1efc9aa69ada9(IGraphics x41347a961b838962, DiagramItem xccb63ca5f63dc470, Boolean x9c41bb4d9b3b314f)
   at MindFusion.Diagramming.Diagram.x679ae26de3befa07(IGraphics x41347a961b838962, RectangleF xd0772cd9ac472b96, Boolean x979174172ae18db3)
   at MindFusion.Diagramming.Diagram.Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, Boolean noModifiedItems)
   at MindFusion.Diagramming.WinForms.DiagramView.x45babdc9db40342f(IGraphics x41347a961b838962, RectangleF xd1cff1e8f8666dbe, Boolean x8de543c74cdd4f6e)
   at MindFusion.Diagramming.WinForms.DiagramView.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m) 



I have also found, that tableNode.RowCount value can be different with tableNode.Rows.Count.

When using tableNode.Rows.RemoveAt(pos); and then reading from tableNode[1, pos], the previous vaue is still there - some updates are not working between RowCount, Rows and tableNode[]... it's then quite complicated to update items in tableNodes, for example if each row represents one object by it's displayname, then renaming one object should be reflected in tableNode - remove object on previous position and inserte it into new position based on it's new displayname. That's currently not working. Or is there a way of automatic sorting of items in tablenode's section?

Edit, I've just found out, that there's also tableNode.DeleteRow(pos); method, and it looks like it's working...
You've said, that operations directly on Rows collection are not supported right now, that's probably the problem - it might be confusing, because there's no warning about that in VS, only in documentation, but most users first try available methods and only after some problems they're looking into documentation Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Crash in UndoManager
Reply #3 - Sep 16th, 2009 at 12:23pm
Print Post  
Ah, yes, you should call DeleteRow; it takes care of undo/redo records, removing corresponding cell objects, etc. We'll try to bind DeleteRow to Rows.Remove for the next release.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint