Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Visual Studio / Windows Form Designer crashes when trying to edit a toolstrip item
 

Visual Studio / Windows Form Designer crashes when trying to edit a toolstrip item

Hi,
I have a Windows Form project in Visual Studio 2008 + SP1, and each time I try to edit a tool strip item in a context menu of my project, Visual Studio just crashes, I mean it just disappears (no error popup, no dialog asking me to post the details to Microsoft), and the process goes away.

I have attached WinDbg to gather the exception details and here it is:

0:000> !PrintException -nested
Exception object: 1da70468
Exception type: System.InvalidOperationException
Message: The designer transaction 'ToolStrip New Item create Transaction.' cannot be committed or canceled because nested transaction 'ToolStrip MenuItem Insert in DropDown Transaction.' is still active. Commit or cancel the nested transaction first.
InnerException: <none>
StackTrace (generated):
SP IP Function
002DF2BC 0D9F684B System_Design_ni!System.ComponentModel.Design.DesignerHost+DesignerHostTransaction.OnCancel()+0x23401b
002DF2EC 7A8E48B8 System_ni!System.ComponentModel.Design.DesignerTransaction.Cancel()+0x28
002DF2F8 0D7766CA System_Design_ni!System.Windows.Forms.Design.ToolStripMenuItemDesigner.CreateDummyItem(System.Type, Int32)+0x196
002DF3A8 0D77A60B System_Design_ni!System.Windows.Forms.Design.ToolStripMenuItemDesigner.EditTemplateNode(Boolean)+0x21b
002DF3E0 0D772982 System_Design_ni!System.Windows.Forms.Design.ToolStripTemplateNode.CenterLabelClick(System.Object, System.Windows.Forms.MouseEventArgs)+0x382
002DF42C 7B747A78 System_Windows_Forms_ni!System.Windows.Forms.ToolStripItem.RaiseMouseEvent(System.Object, System.Windows.Forms.MouseEventArgs)+0x4c
002DF440 7B746BEF System_Windows_Forms_ni!System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)+0x207
002DF484 7B7460B9 System_Windows_Forms_ni!System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)+0x61
002DF498 7BA349FB System_Windows_Forms_ni!System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)+0x83fe8b
002DF4B0 7B740A36 System_Windows_Forms_ni!System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)+0xb2
002DF4DC 7B6F75D3 System_Windows_Forms_ni!System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)+0x28f
002DF568 7BA29B66 System_Windows_Forms_ni!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)+0x861516
002DF5C0 7B1D1D6A System_Windows_Forms_ni!System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)+0x2a
002DF5CC 7B1F1FD1 System_Windows_Forms_ni!System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)+0x71
002DF63C 7B1C8640 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)+0x10
002DF644 7B1C85C1 System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)+0x31
002DF658 7B6FA047 System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)+0x57

StackTraceString: <none>
HResult: 80131509

Nested exception -------------------------------------------------------------
Exception object: 1d9c2e40
Exception type: System.InvalidOperationException
Message: The designer transaction 'ToolStrip MenuItem Insert in DropDown Transaction.' cannot be committed or canceled because nested transaction 'ToolStrip MenuItem Insert in DropDown Transaction.' is still active. Commit or cancel the nested transaction first.
InnerException: <none>
StackTrace (generated):
SP IP Function
002DF1F4 0D9F68DF System_Design_ni!System.ComponentModel.Design.DesignerHost+DesignerHostTransaction.OnCommit()+0x233fbf
002DF224 7A8E4A04 System_ni!System.ComponentModel.Design.DesignerTransaction.Commit()+0x28
002DF230 0D77514A System_Design_ni!System.Windows.Forms.Design.ToolStripMenuItemDesigner.CommitInsertTransaction(Boolean)+0x5a
002DF240 0D7757F5 System_Design_ni!System.Windows.Forms.Design.ToolStripMenuItemDesigner.ComponentChangeSvc_ComponentAdded(System.Object, System.ComponentModel.Design.ComponentEventArgs)+0x5c5
002DF2B4 0D7B7497 System_Design_ni!System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(System.ComponentModel.IComponent, System.String, System.ComponentModel.IContainer)+0x177
002DF2F4 0D7B765B System_Design_ni!System.ComponentModel.Design.DesignerHost.Add(System.ComponentModel.IComponent, System.String)+0x7b
002DF328 0D7B5A51 System_Design_ni!System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(System.Type, System.String)+0xe1
002DF368 0D7B5B53 System_Design_ni!System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(System.Type)+0xb
002DF370 0D7765FD System_Design_ni!System.Windows.Forms.Design.ToolStripMenuItemDesigner.CreateDummyItem(System.Type, Int32)+0xc9

StackTraceString: <none>
HResult: 80131509


It looks like a bug to me, but is there anything I could do to my project, like change my form, or the layout or the inner controls, so I can edit it again. Each time I close and reopen Visual Studio, the bugis there, so I cannot edit my form anymore, at all :(

Thanks!


Simon Mourier
Simon Mourier  Thursday, April 02, 2009 10:30 AM
Found a solution ? I'm having the same prob
justanotherguy_be  Monday, May 25, 2009 1:02 AM
Hi,

Well, not really.

I modified the designer.cs file manually, removed what *seemed to be linked to the issue*, then I prayed, burned some candles, invoked ancient voodoo spells, and voilĂ !

Simon.
Simon Mourier
Simon Mourier  Tuesday, May 26, 2009 1:42 PM

You can use google to search for other answers

Custom Search

More Threads

• Custom DataGridView Columns
• Win XP style in designer window of VS.Net 2003
• Form Designer Questions
• How do I get to the Designer?
• CollectionEditor re-creates removed items
• Another Validation Conundrum
• Using DesignSurface with licensed components
• File signing in .NET
• Drag from Toolbox to form needs to add two references!
• how to validate masktextbox