Hi,
I have been using XPToolbar since some time but in the recent update i am getting issue with the component. Component gets crashed / a red cross appears within it.
i have tried my best to solve this, ensured that no cross thread communication should happen but still it is getting crashed randomly and some rarely too.
Is there anyway to handle these uncaught errors in the components? I am already using ThreadException and CurrentDomain.UnhandledException.
Stack Trace
07-Sep-2021 11:49:08.672 - Sender: System.Threading.Thread Class: System.Threading.Thread - Error: A generic error occurred in GDI+.
Stack: at System.Drawing.Image.FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
at System.Drawing.Image.FromHbitmap(IntPtr hbitmap)
at System.Windows.Forms.ImageList.GetBitmap(Int32 index)
at System.Windows.Forms.ImageList.ImageCollection.get_Item(Int32 index)
at System.Windows.Forms.ImageList.ImageCollection.System.Collections.IList.get_Item(Int32 index)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItemRenderer.DrawTextAndImage(Graphics g, RectangleF rectTextAndImage, Font textFont, Color textColor, Color bgColor, DrawItemState state)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItemRenderer.DrawInterior(DrawToolbarItemEventArgs drawItemInfo)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarItemRenderer.OnPaint(Graphics g, Rectangle clippingRect)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarRenderer.OnPaint(Graphics g, Rectangle clipRect)
at Syncfusion.Windows.Forms.Tools.XPMenus.MultilineBarRenderer.OnPaint(Graphics g, Rectangle clipRect)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarControlInternal.OnPaint(PaintEventArgs e)
at Syncfusion.Windows.Forms.Tools.XPMenus.XPToolBar.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.Tools.XPMenus.BarControlInternal.WndProc(Message& m)
at Syncfusion.Windows.Forms.Tools.XPMenus.XPToolBar.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)
Source: System.Drawing
####################################
Target Site: FromHbitmap