Posted 14 years ago
by Joachim Schwieren

Hello,
a customer using our product which uses SyntaxEditor reported the following exception. It seams to appear randomly and the stack trace shows that there is no direct link to our code...
Exception (System.IndexOutOfRangeException: Array Index out of bounds.
bei a5.b(Int32 A_0)
bei g.a(Int32 A_0)
bei ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
bei ActiproSoftware.SyntaxEditor.EditorView.OffsetToPosition(Int32 offset)
bei ActiproSoftware.SyntaxEditor.Selection.a(Int32 A_0, Int32 A_1, Int32 A_2)
bei ActiproSoftware.SyntaxEditor.Selection.get_EndEditPosition()
bei ActiproSoftware.SyntaxEditor.EditorView.j()
bei ActiproSoftware.SyntaxEditor.EditorView.f()
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.OnGotFocus(EventArgs e)
bei System.Windows.Forms.Control.WmSetFocus(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam))
Do you have an idea why this one happens? There is no clear way to reproduce it, it happens accidently...
EDIT: The customer told me that the exception occurs when he tries to load a binary file (e.g. an SWF file in his case); this does not make much sense because SyntaxEditor is a text editor but is there any change to prevent this or to raise a warning when a binary file is loaded into the control?
Regards,
Joachim
[Modified at 11/08/2011 07:36 AM]
a customer using our product which uses SyntaxEditor reported the following exception. It seams to appear randomly and the stack trace shows that there is no direct link to our code...
Exception (System.IndexOutOfRangeException: Array Index out of bounds.
bei a5.b(Int32 A_0)
bei g.a(Int32 A_0)
bei ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
bei ActiproSoftware.SyntaxEditor.EditorView.OffsetToPosition(Int32 offset)
bei ActiproSoftware.SyntaxEditor.Selection.a(Int32 A_0, Int32 A_1, Int32 A_2)
bei ActiproSoftware.SyntaxEditor.Selection.get_EndEditPosition()
bei ActiproSoftware.SyntaxEditor.EditorView.j()
bei ActiproSoftware.SyntaxEditor.EditorView.f()
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.OnGotFocus(EventArgs e)
bei System.Windows.Forms.Control.WmSetFocus(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam))
Do you have an idea why this one happens? There is no clear way to reproduce it, it happens accidently...
EDIT: The customer told me that the exception occurs when he tries to load a binary file (e.g. an SWF file in his case); this does not make much sense because SyntaxEditor is a text editor but is there any change to prevent this or to raise a warning when a binary file is loaded into the control?
Regards,
Joachim
[Modified at 11/08/2011 07:36 AM]