Posted 18 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
A user recently got this exception:

Top Level Exception
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Drawing
Stack Trace: at
System.Drawing.SafeNativeMethods.GdipFillRectangleI(HandleRef graphics,
HandleRef brush, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y,
Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at _53._4(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView._1(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView.OnRender(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIElement.Render(PaintEventArgs e)
at
ActiproSoftware.WinUICore.UIControl.OnRenderChildElements(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl.Render(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl._1(PaintEventArgs )
at ActiproSoftware.WinUICore.UIControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

After getting this exception the editor portion of the SE control was replaced with a big red X.

Any idea on this one? It seems to occur at random times during app usage.

Thanks,

Ashton

Comments (3)

Posted 18 years ago by Ashton - Developer, Schema Solutions LLC
Avatar
Also, same user got this exception immediately after closing exception window and continuing:

Top Level Exception
Type: System.ArgumentException
Message: Invalid parameter used.
Source: System.Drawing
Stack Trace: at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y,
Int32 width, Int32 height)
at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
at _53._4(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView._1(Graphics , Rectangle )
at ActiproSoftware.SyntaxEditor.EditorView.OnRender(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIElement.Render(PaintEventArgs e)
at
ActiproSoftware.WinUICore.UIControl.OnRenderChildElements(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl.Render(PaintEventArgs e)
at ActiproSoftware.WinUICore.UIControl._1(PaintEventArgs )
at ActiproSoftware.WinUICore.UIControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(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.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Thanks
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I haven't seen that happen... it seems like either the Graphics or the Brush must be null since the exception is happening in Microsoft's API code. Or there is a bug in Microsoft's API code that is throwing this. I can't say unless you can help me find steps to duplicate it so that I can debug it.


Actipro Software Support

Posted 18 years ago by Craig Neblett
Avatar
I've seen that same stack trace before with other controls (the .NET portion anyway) and it has always been the result of code executing on a thread other than the main thread causing the UI to update.
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.