Posted 17 years ago
by Adam Dickinson
Version: 4.0.0262
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Here's another one relating to the closing/disposing of a Document/SyntaxEditor instance. A user was closing a bunch of documents in quick succession.
System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Document.OffsetToPosition(Int32 offset)
at ActiproSoftware.SyntaxEditor.Selection.get_EndDocumentPosition()
at ragScriptEditor.Form1.editor_GotFocus(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnGotFocus(EventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The release notes for 4.0.270 mentions a fix to a disposed SyntaxEditor, but since this bug happens so randomly, it's hard for me to say if it is fixed in the latest version or not.
Lucky for me, it's my own code that is trying to access the EndDocumentPosition property, so I am able to test for this failure case and avoid the exception myself.
Thanks.
System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Document.OffsetToPosition(Int32 offset)
at ActiproSoftware.SyntaxEditor.Selection.get_EndDocumentPosition()
at ragScriptEditor.Form1.editor_GotFocus(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnGotFocus(EventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(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.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The release notes for 4.0.270 mentions a fix to a disposed SyntaxEditor, but since this bug happens so randomly, it's hard for me to say if it is fixed in the latest version or not.
Lucky for me, it's my own code that is trying to access the EndDocumentPosition property, so I am able to test for this failure case and avoid the exception myself.
Thanks.