NI產品與技術 討論區

取消
顯示結果 
搜尋替代 
您的意思是: 

ScatterGraph 發生"集合已修改; 列舉作業可能尚未執行"

os:windows xp sp3

Microsoft Visual Studio 2008 vb.net

Measurement Studio 8.6

會出現下列錯誤,我又沒辦法擷取錯誤,請問有什麼方法可以解決嗎。

 

System.InvalidOperationException 未處理
  Message="集合已修改; 列舉作業可能尚未執行。"
  Source="mscorlib"
  StackTrace:
       於 System.Collections.Hashtable.HashtableEnumerator.MoveNext()
       於 NationalInstruments.UI.Internal.InnerAxisElement.a(ComponentDrawArgsInternal A_0, RectangleF[] A_1)
       於 NationalInstruments.UI.Internal.InnerAxisElement.DrawForeground(ComponentDrawArgsInternal args)
       於 NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1, Boolean A_2)
       於 NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)
       於 NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1, Boolean A_2)
       於 NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)
       於 NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1, Boolean A_2)
       於 NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal A_0, Rectangle A_1)
       於 NationalInstruments.Restricted.ControlElement.Paint(PaintEventArgs e)
       於 NationalInstruments.UI.WindowsForms.ControlBase.OnPaint(PaintEventArgs e)
       於 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
       於 System.Windows.Forms.Control.WmPaint(Message& m)
       於 System.Windows.Forms.Control.WndProc(Message& m)
       於 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       於 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       於 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       於 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       於 System.Windows.Forms.Application.Run(ApplicationContext context)
       於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       於 WindowsApplication11.My.MyApplication.Main(String[] Args) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 81
       於 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       於 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       於 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       於 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       於 System.Threading.ThreadHelper.ThreadStart()
  InnerException:

 

0 積分
1 條訊息(共 8 條)
7,590 檢視

如果不是以下二者請升級,請告知升級後是否出現此現象

 

visual studio 2008 sp1

 

measurement studio 8.6.1

 

http://digital.ni.com/public.nsf/allkb/961CB182B0F3C2EE8625755F0066A47D

 

http://joule.ni.com/nidu/cds/view/p/id/1282/lang/zht

0 積分
2 條訊息(共 8 條)
7,583 檢視

我已試到答案但不知是否正確,目前run都沒問題

 ScatterGraph1.Plots.Item(0).XAxis.Mode = AxisMode.AutoScaleLoose
 ScatterGraph1.Plots.Item(0).YAxis.Mode = AxisMode.AutoScaleVisibleExact

將mode改變一下就行了

0 積分
3 條訊息(共 8 條)
7,581 檢視
跑久了還是一樣會出錯...
0 積分
4 條訊息(共 8 條)
7,552 檢視

請問軟體版本是???

 

vs 2008 sp1???

 

mstudio 861???

0 積分
5 條訊息(共 8 條)
7,546 檢視

Visual Studio 2008 sp1

 

Measurement Studio 8.6

 

0 積分
6 條訊息(共 8 條)
7,544 檢視

請問8.6.1是指Measurement Studio 2009 嗎

0 積分
7 條訊息(共 8 條)
7,543 檢視

plz download http://joule.ni.com/nidu/cds/view/p/id/1282/lang/zht

 

or attach your code here.

 

We have 8.6.1 here and can test for you.

0 積分
8 條訊息(共 8 條)
7,540 檢視