NullReferenceException

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by bnott
Avatar
When running under a debugger, every time I close my application I get one or more:

A first chance exception of type 'System.NullReferenceException' occurred in actiprosoftware.winuicore.dll

Additional information: Object reference not set to an instance of an object.

Thanks.

Comments (8)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Can you get a stack trace? I tried turning on break on exceptions in the sample project but didn't get any exceptions.


Actipro Software Support

Posted 14 years ago by bnott
Avatar
I don't have break on exceptions on. The exception happens after Application.Run has exited, so the call stack is no good.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'll need to be able to duplicate it in order to fix it. If you can make a test application that shows the problem that would be great.

In the mean time, maybe before you close your app, ensure that the control is disposed.


Actipro Software Support

Posted 14 years ago by bnott
Avatar

>    actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitterViewInfo.Dispose(bool disposing = true) + 0x28 bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.ᐂ(bool  = true) + 0x1f bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.Dispose() + 0x14 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitter.ᐂ(ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitterViewLocation  = Default) + 0x73 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitter.Dispose(bool disposing = false) + 0x91 bytes    
     actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.Document.Dispose(bool disposing = false) + 0x57 bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.ᐂ(bool  = false) + 0x1f bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.Finalize() + 0x1e bytes    

  
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ok I think I see what could be causing it. Does it stop happening in your app if you dispose the control first before shutting down?


Actipro Software Support

Posted 14 years ago by bnott
Avatar
The control is used on a tab in a dialog window. I am explicitly disposing the control when the window closes. The exception still occurrs. I have view splitters totally turned off. It seems that if i keep hitting Continue when the exception comes up, it always happens about 4 times.
Posted 14 years ago by bnott
Avatar
Here's another one:
  
>    system.windows.forms.dll!System.Windows.Forms.Control.SetAcceptDrops(bool accept = true) + 0x20a bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.OnHandleCreated(System.EventArgs e = {System.EventArgs}) + 0x93 bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.WmCreate(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x79 bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x3be bytes    
     system.windows.forms.dll!System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x6c bytes    
     system.windows.forms.dll!System.Windows.Forms.ContainerControl.WndProc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x37 bytes    
     system.windows.forms.dll!System.Windows.Forms.UserControl.WndProc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x37 bytes    
     system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0x13 bytes    
     system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message m = {System.Windows.Forms.Message}) + 0xda bytes    
     system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int hWnd = 4065192, int msg = 1, int wparam = 0, int lparam = 119728216) + 0x3d bytes    
     system.windows.forms.dll!System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(int dwExStyle = 65536, string lpszClassName = "WindowsForms10.Window.8.app5", string lpszWindowName = null, int style = 1442906112, int x = 0, int y = 0, int width = 583, int height = 428, System.Runtime.InteropServices.HandleRef hWndParent = {System.Runtime.InteropServices.HandleRef}, System.Runtime.InteropServices.HandleRef hMenu = {System.Runtime.InteropServices.HandleRef}, System.Runtime.InteropServices.HandleRef hInst = {System.Runtime.InteropServices.HandleRef}, System.Object pvParam = <undefined value> ) + 0x41 bytes    
     system.windows.forms.dll!System.Windows.Forms.NativeWindow.CreateHandle(System.Windows.Forms.CreateParams cp = {System.Windows.Forms.CreateParams}) + 0x2bd bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.CreateHandle() + 0x1bb bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.get_Handle() + 0x34 bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.CreateGraphicsInternal() + 0xe bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.CreateGraphics() + 0x2b bytes    
     actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.EditorView.ᐃ() + 0x192 bytes    
     actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.EditorView.ᐁ(bool  = false, bool  = false) + 0x15 bytes    
     actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.EditorView.OnResize(System.EventArgs e = {System.EventArgs}) + 0x18 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.UIObject.set_Bounds(System.Drawing.Rectangle value = {X=0 Y=0 Width=583 Height=428}) + 0x91 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitter.OnLayout(ActiproSoftware.WinUICore.UIComponentEventArgs e = {ActiproSoftware.WinUICore.UIComponentEventArgs}) + 0xc45 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.UIObject.PerformLayout() + 0x29 bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.UIObject.set_Bounds(System.Drawing.Rectangle value = {X=0 Y=0 Width=583 Height=428}) + 0x72 bytes    
     actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.SyntaxEditor.OnLayout(System.Windows.Forms.LayoutEventArgs e = {System.Windows.Forms.LayoutEventArgs}) + 0x73 bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.Control affectedControl = {Value=0}, string affectedProperty = "Parent") + 0x7c bytes    
     system.windows.forms.dll!System.Windows.Forms.Control.ControlCollection.Remove(System.Windows.Forms.Control value = {Value=0}) + 0xdb bytes    
     actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.ViewSplitter.UIViewSplitterViewInfo.Dispose(bool disposing = false) + 0x3f bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.ᐂ(bool  = false) + 0x1f bytes    
     actiprosoftware.shared.dll!ActiproSoftware.ComponentModel.DisposableObject.Finalize() + 0x1e bytes    

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It would help if you could get a test application together for this that demonstrates the exception.

Just FYI... A lot of the WinUICore framework has been changed for the upcoming 2.5 release this week hopefully to remove problems like this.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.