InvalidOperationException
Posted: Thu Feb 15, 2007 5:43 pm
Hi,
Currently I'm working on an app and getting the following exception (The exception is cut and pasted to the end of this post.
I am unable to debug this because the exception happens outside of the application.
I noticed that someone else on the forum had the same problem, but the answer was never posted
I think the error might be due to the multi-threaded nature of my application, and if so, are there any rules when using teechart in a multi-threaded context?
I have placed locks around all points where i do a line.Add(), but that doesn't seem to solve the problem.
Thanks
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.Collections.ArrayListEnumeratorSimple.MoveNext()
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TritonDotNetAPI
Assembly Version: 2.2.4.28041
Win32 Version: Version 3.1 Iteration 4 Build 8173
CodeBase: file:///C:/Program%20Files/ITG/Triton/TritonDotNetAPI.DLL
----------------------------------------
Interop.TritonFrontendLib
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.TritonFrontendLib.DLL
----------------------------------------
Interop.TritonFrontendEventsLib
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.TritonFrontendEventsLib.DLL
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
BlackHen.Threading
Assembly Version: 1.0.2594.19751
Win32 Version: 1.0.2594.19751
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/BlackHen.Threading.DLL
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.84.0.0
Win32 Version: 0.84.0.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ICSharpCode.SharpZipLib.dll
----------------------------------------
ITGC Best Execution
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ITGC%20Best%20Execution.DLL
----------------------------------------
System.Web.Services
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.web.services/1.0.5000.0__b03f5f7f11d50a3a/system.web.services.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
ITGC Triton Library
Assembly Version: 1.2.16.0
Win32 Version: 1.2.16.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ITGC%20Triton%20Library.DLL
----------------------------------------
MDAPI
Assembly Version: 1.0.2001.24671
Win32 Version: 1.0.2001.24671
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/MDAPI.dll
----------------------------------------
PdfSharp
Assembly Version: 0.8.494.0
Win32 Version: 0.8.494.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/PdfSharp.DLL
----------------------------------------
TeeChart
Assembly Version: 2.0.2179.21171
Win32 Version: 2.0.2179.21171
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/TeeChart.dll
----------------------------------------
TimeZoneLibrary
Assembly Version: 1.0.2298.28278
Win32 Version: 1.0.2298.28278
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/TimeZoneLibrary.DLL
----------------------------------------
Interop.DssCOM
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.DssCOM.DLL
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
q55sj_wi
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
vb3ubpsu
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (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 machine
rather than being handled by this dialog.
Currently I'm working on an app and getting the following exception (The exception is cut and pasted to the end of this post.
I am unable to debug this because the exception happens outside of the application.
I noticed that someone else on the forum had the same problem, but the answer was never posted
I think the error might be due to the multi-threaded nature of my application, and if so, are there any rules when using teechart in a multi-threaded context?
I have placed locks around all points where i do a line.Add(), but that doesn't seem to solve the problem.
Thanks
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.Collections.ArrayListEnumeratorSimple.MoveNext()
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TritonDotNetAPI
Assembly Version: 2.2.4.28041
Win32 Version: Version 3.1 Iteration 4 Build 8173
CodeBase: file:///C:/Program%20Files/ITG/Triton/TritonDotNetAPI.DLL
----------------------------------------
Interop.TritonFrontendLib
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.TritonFrontendLib.DLL
----------------------------------------
Interop.TritonFrontendEventsLib
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.TritonFrontendEventsLib.DLL
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
BlackHen.Threading
Assembly Version: 1.0.2594.19751
Win32 Version: 1.0.2594.19751
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/BlackHen.Threading.DLL
----------------------------------------
ICSharpCode.SharpZipLib
Assembly Version: 0.84.0.0
Win32 Version: 0.84.0.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ICSharpCode.SharpZipLib.dll
----------------------------------------
ITGC Best Execution
Assembly Version: 1.3.0.0
Win32 Version: 1.3.0.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ITGC%20Best%20Execution.DLL
----------------------------------------
System.Web.Services
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.web.services/1.0.5000.0__b03f5f7f11d50a3a/system.web.services.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
ITGC Triton Library
Assembly Version: 1.2.16.0
Win32 Version: 1.2.16.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/ITGC%20Triton%20Library.DLL
----------------------------------------
MDAPI
Assembly Version: 1.0.2001.24671
Win32 Version: 1.0.2001.24671
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/MDAPI.dll
----------------------------------------
PdfSharp
Assembly Version: 0.8.494.0
Win32 Version: 0.8.494.0
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/PdfSharp.DLL
----------------------------------------
TeeChart
Assembly Version: 2.0.2179.21171
Win32 Version: 2.0.2179.21171
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/TeeChart.dll
----------------------------------------
TimeZoneLibrary
Assembly Version: 1.0.2298.28278
Win32 Version: 1.0.2298.28278
CodeBase: file:///C:/Program%20Files/ITG/Custom/Plugins/bin/ITGC%20Best%20Execution/TimeZoneLibrary.DLL
----------------------------------------
Interop.DssCOM
Assembly Version: 301.434.0.0
Win32 Version: 301.434.0.0
CodeBase: file:///C:/Program%20Files/ITG/Triton/Interop.DssCOM.DLL
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
q55sj_wi
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
vb3ubpsu
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (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 machine
rather than being handled by this dialog.