can anyone help me with closing my form. I am getting the
following JIT errors

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at Microsoft.VisualBasic.PowerPacks.ShapeCollection.Dispose(Boolean disposing)
   at Microsoft.VisualBasic.PowerPacks.ShapeContainer.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
   at System.Windows.Forms.TabControl.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Dispose()
   at System.Windows.Forms.Control.Dispose(Boolean disposing)
  at System.Windows.Forms.Form.Dispose(Boolean disposing)
   at Bentalls.cmddel.Dispose(Boolean disposing)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.269 (RTMGDR.030319-2600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Bentalls
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Bentalls.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.269 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.225 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.278 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.282 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.VisualBasic.PowerPacks.Vs
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.20911.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks.Vs/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.Vs.dll
----------------------------------------
Infragistics2.Win.Misc.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics2.Win.Misc.v12.1.DLL
----------------------------------------
Infragistics2.Win.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics2.Win.v12.1.DLL
----------------------------------------
Infragistics2.Shared.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics2.Shared.v12.1.DLL
----------------------------------------
Infragistics4.Win.UltraWinGrid.ExcelExport.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics4.Win.UltraWinGrid.ExcelExport.v12.1.DLL
----------------------------------------
Infragistics4.Win.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics4.Win.v12.1.DLL
----------------------------------------
Infragistics4.Shared.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics4.Shared.v12.1.DLL
----------------------------------------
Infragistics4.Documents.Excel.v12.1
    Assembly Version: 12.1.20121.2038
    Win32 Version: 12.1.20121.2038
    CodeBase: file:///C:/Documents%20and%20Settings/ross.kelly.BENTALLS/Local%20Settings/Apps/2.0/531DWY4E.V8N/4RTT63W5.RZM/bent..tion_31cf6dc5d97f69d8_0001.0000_4aa5bd122e5f7181/Infragistics4.Documents.Excel.v12.1.DLL
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.225 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Hi,
When exactly did this start happening? I see you are using an object Bentalls? Could this have been corrupted?

please ALWAYS post precis question , there is no time to read all your debugging information . what is your prob? ,tell us your prob in simple words.

This article has been dead for over six months. Start a new discussion instead.