Solved

A generic error occurred in GDI+

  • 19 September 2022
  • 3 replies
  • 953 views

Badge +8

Hi,

I get below error message when trying to use Inventory Part in Stock.

Does anyone know how to resolve this one?

 

Ifs.Fnd.FndSystemException: Explorer: An Unhandled Exception has occurred ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)
at System.Drawing.Graphics.MeasureString(String text, Font font, Int32 width, StringFormat format)
at Ifs.Fnd.Windows.Forms.DataGrid.FndDataGridComponent.MouseMove_Init(FndDataGridColumn& oColumn, FndDataGridRow& oRow, FndDataGridCell& oCell, MouseEventArgs e, Int32 eY, Int32& colorRow, Int32& colorCol, Boolean& refreshDropDown, Boolean& setUrlHand)
at Ifs.Fnd.Windows.Forms.DataGrid.FndDataGridComponent.OnGridMouseMove(MouseEventArgs e)
at Ifs.Fnd.Windows.Forms.DataGrid.FndDataGrid.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at Ifs.Fnd.Windows.Forms.DataGrid.FndDataGrid.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)

Thank You

Saradha

icon

Best answer by Ben Monroe 20 September 2022, 11:24

View original

3 replies

Userlevel 5
Badge +12

Hi @LevSupunS ,

This is a Microsoft error.
GDI+ is the graphics subsystem in Windows, used by the GUI components in Windows Form.
Even in non-IFS software, similar errors may be found with a search engine.
The error itself, though, is generic and does not have enough information to identify the problem.
The call stack shows that Windows Forms is trying to measure a string (=text). (This can be seen in the Graphics.MeasureString line.)
At this point a "generic" error is occurring.
Can you please tell us the following:

  1. In the Inventory Part in Stock, are any of the fields extremely long?
  2. Is any of the fields using non-ASCII characters?
  3. Are you using Windows 8 or earlier?
  4. Is this always repeatable?

 

Best regards,
-- Ben

Badge +8

Hi @Ben Monroe 

thanks for response

  1. yes, there are long fields
  2. . As I know , no use of non-ASCII characters
  3. windows 10
  4. No, it happened last Friday, when pulling out a lot of data from this module until it stopped working 

Regards

Saradha

Userlevel 5
Badge +12

Hi @LevSupunS,

Thank you for the details.
The fact that 1) this does not reproduce and 2) occurred when "pulling out a lot of data" suggests to me that Windows was under memory and/or handle pressure.
GDI+ (Windows) uses "handles" to track GUI resources. These handles are shared by all Windows processes.
Windows has a limit of handles available.
You can check the number of handles in use via Task Manager -> Performance (CPU tab).
The exact number will fluctuate, but please have a general idea of what is normal / typical for your environment.
If this later reproduces, then please check the number of handles to see if it is particularly higher than normal.

That said, there is not too much that can be done to resolve this other than reduce the number of loaded applications.
This will reduce the number of handles in use so that they used elsewhere.

 

Best regards,
Ben
IFS | GSD Technology

Reply