(Sorry, I accidentally posted this on General Discussions. Delete that one if you like)
Several of our customers are having problems with application crashes that manifest themselves in the same way (all toolbars crash with the the red X across the toolbar controls in our MainFrame client). Crashes are random and happening fairly frequently at a couple of different sites. Operating System is Windows 7 64-bit, Infragistics 11.1.20111.2020. This error seems to be happening in several different scenarios for other Infragistics developers. I thought I would post my Stack Trace and see if anybody has seen this before. It appears that it's in a normal refresh when Infragistics needs to draw it's controls. This problem is going critical for me now I must find a fix soon.
Thanks,
Derek
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
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 Infragistics.Win.AppearanceData.GetImageFromImageList(Object image, ImageList imageList)
at Infragistics.Win.UltraWinStatusBar.UltraStatusBar.Infragistics.Win.IUIElementImageAndTextProvider.GetImage(ImageAndTextUIElement element)
at Infragistics.Win.ImageAndTextUIElement.PositionChildElements()
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe)
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 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
GeoCue
Assembly Version: 2011.1.20.1
Win32 Version: 2011.1.20.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GeoCue.exe
System.Windows.Forms
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System
Win32 Version: 4.0.30319.232 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
DotSpatial.Controls
Assembly Version: 0.11.9.6
Win32 Version: 0.11.9.6
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Controls.DLL
DotSpatial.Symbology
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Symbology.DLL
DotSpatial.Data
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Data.DLL
DotSpatial.Projections
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Projections.DLL
System.Core
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
DotSpatial.Topology
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Topology.DLL
Infragistics2.Win.v11.1
Assembly Version: 11.1.20111.2020
Win32 Version: 11.1.20111.2020
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.v11.1.DLL
System.Data
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
System.Xml
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
GeoCueDotSpatial
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GeoCueDotSpatial.DLL
RepositoryAPI
Assembly Version: 1.2.0.1
Win32 Version: 1.2.0.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RepositoryAPI.DLL
RepositoryClient
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0.0
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RepositoryClient.DLL
RepositoryShared
Assembly Version: 1.6.0.0
Win32 Version: 1.6.0.0
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RepositoryShared.DLL
EARTHLib
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/EARTHLib.DLL
Infragistics2.Shared.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Shared.v11.1.DLL
Infragistics2.Win.UltraWinGrid.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinGrid.v11.1.DLL
Infragistics2.Win.UltraWinDataSource.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinDataSource.v11.1.DLL
Infragistics2.Win.UltraWinTabControl.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinTabControl.v11.1.DLL
Infragistics2.Win.UltraWinToolbars.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinToolbars.v11.1.DLL
Infragistics2.Win.UltraWinTree.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinTree.v11.1.DLL
Infragistics2.Win.UltraWinStatusBar.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinStatusBar.v11.1.DLL
Infragistics2.Win.UltraWinDock.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinDock.v11.1.DLL
Infragistics2.Win.Misc.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.Misc.v11.1.DLL
Infragistics2.Win.UltraWinEditors.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinEditors.v11.1.DLL
DotSpatial.Serialization
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/DotSpatial.Serialization.DLL
System.Configuration
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
Accessibility
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
System.Numerics
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
RasterEngine
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RasterEngine.DLL
NIIRS10Utilities
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/NIIRS10Utilities.DLL
gdal_csharp
Assembly Version: 1.0.4092.13603
Win32 Version: 1.0.4092.13603
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/gdal_csharp.DLL
GeoCueUtility
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GeoCueUtility.DLL
RepositoryFederatorClientShared
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RepositoryFederatorClientShared.DLL
System.Runtime.Remoting
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
CustomMarshalers
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
GeoCue.Shared.Strings
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GeoCue.Shared.Strings.DLL
GCFederator.AutoClientProxies
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GCFederator.AutoClientProxies.DLL
System.ServiceModel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ServiceModel/v4.0_4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
System.Web
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
System.Deployment
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
System.Runtime.Serialization.Formatters.Soap
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll
BruTile
Assembly Version: 0.5.1.0
Win32 Version: 0.5.1.0
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/BruTile.DLL
RasterEngineUtils
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/RasterEngineUtils.DLL
System.Xaml
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
GeoCueCmdParams
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GeoCueCmdParams.DLL
Infragistics2.Win.UltraWinPrintPreviewDialog.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinPrintPreviewDialog.v11.1.DLL
Infragistics2.Win.UltraWinGrid.ExcelExport.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Win.UltraWinGrid.ExcelExport.v11.1.DLL
Infragistics2.Documents.Excel.v11.1
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/Infragistics2.Documents.Excel.v11.1.DLL
r4lrw5ty
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
GCGeomUtils
CodeBase: file:///C:/Program%20Files/GeoCue/GeoCue%20Client/GCGeomUtils.DLL
As it turns out... It was crashing in Infragistics because of a problem on my side. In order to display color cursors in my .NET app I was "punching" through to the Win32 LoadCursor call. Unfortunately, I was doing this on a refresh and it was using a GDI handle every time. Eventually, I would run out of the default 10,000 GDI+ handles limit causing a crash in whatever call needed a temporary GDI+ handle. More times than not it was an Infragistics draw call.
Lesson learned, be extra careful when making a non-managed Win32 call from managed .NET code. GDI handles are not released automatically like they are in .NET C# code.
BTW, my fix was simply to add the cursors to a Dictionary and re-use them if they already exist in the Dictionary instead of re-creating them over and over.
Thanks, Derek
Hello,
Are you using CreationFilter or DrawFilter in your application in order to add ImageAndTextUIElement in your UltraToolbarsmanager ?
Please test your application with the latest service release of Infragistics 11.1 if the issue is already fix, if not please post a small sample which demonstrate your issue in order to be able to investigate this further for you.
I am waiting for your feedback.