Posted 18 years ago
by Leif Zars

why is my implementation crashing
when ever i remove then try to add the "()" after the statement "components.Dispose()" the following is the exception info.
Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.GetMember(IDomType contextType, IDomType targetType, String name, DomBindingFlags flags)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBContext.a(Document A_0, CompilationUnit A_1, DotNetProjectResolver A_2)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBContext.GetContextBeforeOffset(Document document, Int32 offset, CompilationUnit compilationUnit, DotNetProjectResolver projectResolver, Boolean forParameterInfo)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBSyntaxLanguage.GetContext(SyntaxEditor syntaxEditor, Int32 offset, Boolean beforeOffset, Boolean forParameterInfo)
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetSyntaxLanguage.a(DotNetLanguage A_0, SyntaxEditor A_1, Int32 A_2, Boolean A_3)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBSyntaxLanguage.OnSyntaxEditorKeyTyped(SyntaxEditor syntaxEditor, KeyTypedEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(EditorView A_0, Keys A_1, Char A_2, Boolean A_3)
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 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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
The following full body of code must be put in the editor for the exception to be thrown.
Option Strict Off
Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Drawing
Partial Class NewItem
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.Text = "NewItem"
End Sub
End Class
the exception is not thrown in your demo app only my app, any thoughts on what might be wrong with my implementation.
Thanks
Leif Zars
when ever i remove then try to add the "()" after the statement "components.Dispose()" the following is the exception info.
Object reference not set to an instance of an object.
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetProjectResolver.GetMember(IDomType contextType, IDomType targetType, String name, DomBindingFlags flags)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBContext.a(Document A_0, CompilationUnit A_1, DotNetProjectResolver A_2)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBContext.GetContextBeforeOffset(Document document, Int32 offset, CompilationUnit compilationUnit, DotNetProjectResolver projectResolver, Boolean forParameterInfo)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBSyntaxLanguage.GetContext(SyntaxEditor syntaxEditor, Int32 offset, Boolean beforeOffset, Boolean forParameterInfo)
at ActiproSoftware.SyntaxEditor.Addons.DotNet.Dom.DotNetSyntaxLanguage.a(DotNetLanguage A_0, SyntaxEditor A_1, Int32 A_2, Boolean A_3)
at ActiproSoftware.SyntaxEditor.Addons.VB.VBSyntaxLanguage.OnSyntaxEditorKeyTyped(SyntaxEditor syntaxEditor, KeyTypedEventArgs e)
at ActiproSoftware.SyntaxEditor.SyntaxEditor.a(EditorView A_0, Keys A_1, Char A_2, Boolean A_3)
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 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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
The following full body of code must be put in the editor for the exception to be thrown.
Option Strict Off
Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Drawing
Partial Class NewItem
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.Text = "NewItem"
End Sub
End Class
the exception is not thrown in your demo app only my app, any thoughts on what might be wrong with my implementation.
Thanks
Leif Zars