Posted 19 years ago
by Ashton
-
Developer,
Schema Solutions LLC
I am getting the following exception at random intervals in my application:
Top Level Exception
Type: System.ArgumentOutOfRangeException
Message: Index was out of range. Must be non-negative and less than
the size of the collection.
Parameter name: index
Source: mscorlib
Stack Trace: at System.Collections.ArrayList.get_Item(Int32 index)
at ActiproSoftware.SyntaxEditor.TokenCollection.get_Item(Int32 index)
at ActiproSoftware.SyntaxEditor.TokenCollection._1(Int32 , Int32 )
at ActiproSoftware.SyntaxEditor.EditorView._1(Graphics , Rectangle ,
DocumentLine , Int32 , DisplayLine , _37 , Rectangle , Int32 )
at ActiproSoftware.SyntaxEditor.EditorView._2(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView.OnRender(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIElement.Render(PaintEventArgs e)
at
ActiproSoftware.WinUICore.UIControl.OnRenderChildElements(PaintEventArgs
e)
at ActiproSoftware.WinUICore.UIControl.Render(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl._1(PaintEventArgs )
at ActiproSoftware.WinUICore.UIControl.OnPaint(PaintEventArgs e)
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.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.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)
After I get this exception, the location where the editor portion of the control is turns to a big red X (I've gotten this before when I have exception in paint event in my own controls).
I am not sure what is going on since this seems to be a callback to the editor control (to probably repaint the editor), but it looks like something might be changed during painting causing this error???
Any ideas what might cause this and how I might correct or avoid it?
Thanks,
Top Level Exception
Type: System.ArgumentOutOfRangeException
Message: Index was out of range. Must be non-negative and less than
the size of the collection.
Parameter name: index
Source: mscorlib
Stack Trace: at System.Collections.ArrayList.get_Item(Int32 index)
at ActiproSoftware.SyntaxEditor.TokenCollection.get_Item(Int32 index)
at ActiproSoftware.SyntaxEditor.TokenCollection._1(Int32 , Int32 )
at ActiproSoftware.SyntaxEditor.EditorView._1(Graphics , Rectangle ,
DocumentLine , Int32 , DisplayLine , _37 , Rectangle , Int32 )
at ActiproSoftware.SyntaxEditor.EditorView._2(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView.OnRender(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIElement.Render(PaintEventArgs e)
at
ActiproSoftware.WinUICore.UIControl.OnRenderChildElements(PaintEventArgs
e)
at ActiproSoftware.WinUICore.UIControl.Render(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl._1(PaintEventArgs )
at ActiproSoftware.WinUICore.UIControl.OnPaint(PaintEventArgs e)
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.ScrollableControl.WndProc(Message& m)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.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)
After I get this exception, the location where the editor portion of the control is turns to a big red X (I've gotten this before when I have exception in paint event in my own controls).
I am not sure what is going on since this seems to be a callback to the editor control (to probably repaint the editor), but it looks like something might be changed during painting causing this error???
Any ideas what might cause this and how I might correct or avoid it?
Thanks,