NullReferenceException in Document.get_Characters

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Adam Dickinson
Version: 4.0.0262
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Avatar
Similar steps to repro as seen here.

The user used a "Close All Documents" operation in our application. He indicates that when the last open document was about to close, this exception occurred:

System.NullReferenceException: Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Document.get_Characters(Int32 index)
at ActiproSoftware.SyntaxEditor.DisplayLineCollection.a(Int32 A_0)
at ActiproSoftware.SyntaxEditor.DisplayLine.get_Length()
at ActiproSoftware.SyntaxEditor.DisplayLine.get_EndOffset()
at ActiproSoftware.SyntaxEditor.DisplayLineCollection.e(Int32 A_0)
at ActiproSoftware.SyntaxEditor.EditorView.a(Boolean A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.EditorView.ArrangeCore()
at ActiproSoftware.WinUICore.UIElement.Arrange(Rectangle newBounds)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.ArrangeCore()
at ActiproSoftware.WinUICore.UIControl.Arrange(Rectangle newBounds)
at ActiproSoftware.WinUICore.UIControl.UpdateLayout()
at ActiproSoftware.WinUICore.UIControl.Invalidate(InvalidationLevels levels, InvalidationTypes types)
at ActiproSoftware.WinUICore.UIControl.OnLayout(LayoutEventArgs e)
at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
at System.Windows.Forms.Control.PerformLayout()
at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
at System.Windows.Forms.Layout.LayoutTransaction.Dispose()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at ActiproSoftware.SyntaxEditor.EditorView.Dispose(Boolean disposing)
at ActiproSoftware.ComponentModel.DisposableObject.a(Boolean A_0)
at ActiproSoftware.ComponentModel.DisposableObject.Dispose()
at ActiproSoftware.SyntaxEditor.SyntaxEditor.c(a7 A_0)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at ragScriptEditorShared.ScriptEditor.CloseFile(SyntaxEditor editor)
at ragScriptEditorShared.ScriptEditor.dockControl_Closing(Object sender, DockControlClosingEventArgs e)
at TD.SandDock.DockControl.OnClosing(DockControlClosingEventArgs e)
at TD.SandDock.DockControl.֩(Boolean ֪)
at TD.SandDock.DockControl.Close()
at ragScriptEditorShared.ScriptEditor.CloseFiles(List`1 files)
at ragScriptEditorShared.ScriptEditor.CloseAllFiles()
at ragScriptEditorShared.ScriptEditor.ExecuteAppAction(AppAction action)
at ragScriptEditor.Form1.closeAllTabsToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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)

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks Adam, for the next maintenance release we will block the arrange routines if SyntaxEditor is being disposed.


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.