Hello, I am trying to solve a problem we are having. We have clients running our software over Terminal Services (running on various Windows OS/Server versions). Occasionally, they will receive the following error/stack trace:
A generic error occurred in GDI+.
=>System.Drawing.Bitmap.FromHicon(...)
=>System.Drawing.Icon.ToBitmap(...)
=>Infragistics.Win.UltraWinGrid.RowSelectorUIElement.DrawImage(...)
=>Infragistics.Win.UIElement.DrawElement(...)
=>Infragistics.Win.UIElement.DrawChildElements(...)
=>Infragistics.Win.UIElement.DrawHelper(...)
=>Infragistics.Win.ControlUIElementBase.Draw(...)
=>Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(...)
=>Infragistics.Win.UltraControlBase.OnPaint(...)
=>Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(...)
=>System.Windows.Forms.Control.PaintWithErrorHandling(...)
=>System.Windows.Forms.Control.WmPaint(...)
=>System.Windows.Forms.Control.WndProc(...)
=>System.Windows.Forms.Control.ControlNativeWindow.OnMessage(...)
=>System.Windows.Forms.Control.ControlNativeWindow.WndProc(...)
=>System.Windows.Forms.NativeWindow.Callback(...)
Hi Sean,
From the call stack, it looks like the grid is trying to paint an image into a RowSelector and it's blowing up while trying to create a Bitmap.
Without more information, all I could do here is take some pretty wild guesses.
What version of the grid are you using?
Is the call stack always the same? If not, do you have more call stacks you could post? With more information, we might be able to see a pattern
Sorry for the late response, Mike; I was pulled to another project...
The call stack is always the same. The version of UltraWinGrid.v3 we are using is 3.0.20033.1113. We are not doing anything special with the RowSelector. Here is what the grid looks like in the program:
Thanks,
Sean
We had a similar problem in the reporting product Active Reports.Error happened primarily with WMF files.It became more prevalent as Users upgraded their operating systems.
Struggled for a year and finally the right person came along with the answer.The picture files being used are too old, is the basic problem.Redo them with a more current program and store them as JPEG files.
In Active Reports we also had to add some code to handle the files differently, but I don't know if that would apply in an Infragisitcs grid..We do import JPEG files and store them in SQL server for use on reports.But we don't display them in grids so I don't know what would happen if we did.
We have solved the Active Reports problem, but coincidentally one of my Users emailed me today with this same error. I guess I didn't manage to fix all their report layouts.