By Bill Cunnien - 6/3/2009
The following error was generated while a user was active in a totally different application:
Message: Rectangle '{X=206,Y=0,Width=4,Height=0}' cannot have a width or
height equal to 0.
Source: System.Drawing
Inner Exception:
Stack Trace: at
System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color
color1, Color color2, LinearGradientMode linearGradientMode)
at
MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.RenderVertic
alBar(Graphics DrawObj)
at
MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.OnPaint(Pain
tEventArgs e)
at
System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle, Region transparentRegion)
at
System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs
e, Rectangle rectangle)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e,
Rectangle rectangle)
at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs
pevent)
at
System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs
e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs
e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.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)
Any idea what may have caused this error to occur?
Thanks!
Bill
|
By Trent L. Taylor - 6/3/2009
Using the stack trace, I added a test to prevent a rendering error on this control. I am uncertain how you achieved this, because the height of the control was 0 which is what produced the error. At any rate, next update will prevent the exception even if this happens.
|
By Bill Cunnien - 6/3/2009
Awesome! I have no idea how this happened, either. Users can perform amazing tricks sometimes!
|
By Trent L. Taylor - 6/3/2009
I'll second that!
|
By Bill Cunnien - 8/7/2009
Another user just received this error again...we are on v1.7.0. Here is the error briefing:
Message: Rectangle '{X=206,Y=0,Width=4,Height=0}' cannot have a width or height equal to 0.
Source: System.Drawing
Inner Exception:
Stack Trace: at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
at MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.RenderVerticalBar(Graphics DrawObj)
at MicroFour.StrataFrame.UI.Windows.Forms.ThemedSplitContainer.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmEraseBkgnd(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.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)
Is there anything that I can do on my end?
Thanks!
Bill
|
By Trent L. Taylor - 8/10/2009
Are you on 1.7?
|
By Edhy Rijo - 8/10/2009
Bill Cunnien (08/07/2009) Another user just received this error again...we are on v1.7.0
Yes he is in 1.7
|
By Trent L. Taylor - 8/10/2009
Well, what I really meant was to verify that the client was on 1.7. Are there any 1.6 assemblies hanging around? Is the EXE that they are running compiled in 1.7?
Looking at the source code, I do not see how this could happen since a test has been placed at the top of the OnPaint() method. So it doesn't seem like the 1.7 build is running on the client. If you look at the stack trace and the look at the source, it should not be able to get to the RenderVerticalBar method.
'-- Prevent any rendering if the height or width is 0
If Width < 0 OrElse Height < 0 Then Return
The above code is at the very top of the OnPaint method. If you look at the stack trace, the OnPaint is the point from which this method was called. So I do not see how this would happen. I can try to setup a test....but doesn't make sense.
|
By Bill Cunnien - 8/10/2009
The client is running with the most recent version of the application which employs SF 1.7. I totally agree that this is a weird one. It happens (usually) when the application is idle and the user is working in another application. This particular error has been reported on three different client machines. Although, it may be happening elsewhere, it just may not be getting reported.
I will check these workstations to see if any 1.6 assemblies are floating around.
|
|