Posted 19 years ago by Campion
I'm getting an unhandled exception using the sample C# application and in our application.

Here are the steps:

1. Run the SyntaxEditor C# Sample Editor Application.
2. Clear out all the text by highlighting it all and pressing delete (cursor now in upper left - on line 1).
3. Between the number 1 and the cursor, just right of the yellow, left-click the mouse.
4. Status bar shows Ln 1 - Col 2 - Ch 2 - EndOfDocuementToken.
5. Start typing.

The following exception above is thrown:

Unhandled Exception: System.ArgumentException: The offset '0' added to the length '1' must be less than or equal to the count of characters in the document.
at ActiproSoftware.SyntaxEditor.Document.?(Int32 , Int32 )
at ActiproSoftware.SyntaxEditor.Document.GetSubstring(Int32 offset, Int32 length)
at ActiproSoftware.SyntaxEditor.Document.?(DocumentModificationType , Int32 , Int32 , String )
at ActiproSoftware.SyntaxEditor.Document.UndoableInsert(DocumentModificationType type, Int32 offset, Int32 length, String text)
at ActiproSoftware.SyntaxEditor.EditorView.?(DocumentModificationType , String )
at ActiproSoftware.SyntaxEditor.EditorView.?(String )
at ActiproSoftware.SyntaxEditor.EditorView.InsertText(String text)
at ActiproSoftware.SyntaxEditor.Document.?(Char )
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at TestApplication.EntryPoint.Main() in C:\Program Files\Actipro Software\SyntaxEditor\v2.0.0107\TestApplication-CSharp\EntryPoint.cs:line 20The program '[2424] TestApplication.exe' has exited with code 0 (0x0).

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Thanks, this has been fixed for the next maintenance release.

Actipro Software Support

The latest build of this product (v23.1.2) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.