all groups > dotnet windows forms > august 2004 >
You're in the

dotnet windows forms

group:

A generic error has occured in GDI+



A generic error has occured in GDI+ Dante
8/30/2004 10:17:03 AM
dotnet windows forms: Hi,

I have written a winforms program for a production environment. It runs
24/7. After a few days (2 'till about 10 days) i receive the following error
(stacktrace included). The user sees red boxes with crosses in it and has to
restart the application.
I frankly don't have a clue about where this error comes from. It's a
standard winforms application and the GDI+ objects doesn't seem to reach the
maximum amount.

Can someone give me a clue?


An unhandled exception has occurred.
msg: A generic error occurred in GDI+.
stacktrace: at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush,
RectangleF layoutRectangle, StringFormat format)
at System.Windows.Forms.Label.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.Label.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)
source: System.Drawing

--
RE: A generic error has occured in GDI+ Iulian
8/31/2004 8:57:09 AM
Hi,

Open the task manager and leave it on the Performance tab and notice what is
the number of handles. Maybe the application leaks some resources...


Regards,
Iulian
http://www.olvio.com/


[quoted text, click to view]
RE: A generic error has occured in GDI+ Dante
8/31/2004 10:09:03 AM

I have included two routines in my debugging report so i can get the actual
number of handles and GDI+ objects. Are there other specific thinks i should
look for ?

AddThis Social Bookmark Button