We use version 10.1.20101.2027. This happens occasionally when the user closes a window and the dispose method is called. I see there has been reported something similar with the UltraWinToolbars in this thread: http://forums.infragistics.com/forums/p/41053/236401.aspx#236401.
The stack trace follows bellow:
System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.GetHdc()
at System.Windows.Forms.Internal.WindowsGraphics.FromGraphics(Graphics g, ApplyGraphicsProperties properties)
at System.Windows.Forms.WindowsGraphicsWrapper..ctor(IDeviceContext idc, TextFormatFlags flags)
at System.Windows.Forms.TextRenderer.MeasureText(IDeviceContext dc, String text, Font font, Size proposedSize, TextFormatFlags flags)
at Infragistics.Win.DrawUtility.MeasureStringHelper(Graphics gr, String text, Font font, Size layoutArea, StringFormat stringFormat, Int32& charactersFitted, Int32& linesFilled, Boolean returnElementsFitted, GdiDrawStringFlags drawStringFlags)
at Infragistics.Win.DrawUtility.MeasureStringHorizontalFlowHelper(DrawStringParameters& parameters, Boolean trackCharactersFitted, Int32& charactersFitted, Int32& linesFilled, SizeF& unrotatedLayoutArea, SizeF& unrotatedTextSize)
at Infragistics.Win.DrawUtility.MeasureStringHorizontalFlow(DrawStringParameters& parameters, Boolean trackCharactersFitted, Int32& charactersFitted, Int32& linesFilled, SizeF& unrotatedLayoutArea, SizeF& unrotatedTextSize)
at Infragistics.Win.DrawUtility.MeasureStringHelper(DrawStringParameters& parameters, Boolean trackCharactersFitted, Int32& charactersFitted, Int32& linesFilled)
at Infragistics.Win.DrawUtility.MeasureString(DrawStringParameters& parameters)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.MeasureStringF(Graphics gr, String text, Font font, Int32 maxWidth, StringFormat sf, TextOrientationInfo textOrientation)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.MeasureString(Graphics gr, String text, Font font, Int32 maxWidth, StringFormat sf, TextOrientationInfo textOrientation)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.CalculateFontSize(Font font, String text, Int32 maxWidth, TextOrientationInfo textOrientation)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.CalculateFontHeight(Font font)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.CalculateFontHeight(AppearanceData& appData)
at Infragistics.Win.UltraWinGrid.UltraGridLayout.get_DefaultFontHeight()
at Infragistics.Win.UltraWinGrid.UltraGridBand.CalcMinRowHeight()
at Infragistics.Win.UltraWinGrid.UltraGridBand.GetMinRowHeightHelper(Boolean synchronized)
at Infragistics.Win.UltraWinGrid.UltraGridBand.get_RowHeightResolved()
at Infragistics.Win.UltraWinGrid.RowScrollRegion.ResetScrollInfo()
at Infragistics.Win.UltraWinGrid.ScrollRegionBase.ShowScrollbar(Boolean show, Boolean resetScrollInfo)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.PositionScrollbar(Boolean resetScrollInfo)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
at Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
at Infragistics.Win.UltraWinGrid.ScrollRegionBase.WillScrollbarBeShown()
at Infragistics.Win.UltraWinGrid.ViewStyleBase.AddBandHeaders(ColScrollRegion csr, UltraGridBand band)
at Infragistics.Win.UltraWinGrid.ViewStyleSingle.RecreateHeaderList(ColScrollRegion csr)
at Infragistics.Win.UltraWinGrid.ColScrollRegion.RegenerateVisibleHeaders()
at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
at Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics()
at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember)
at Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource(Object value)
at Infragistics.Win.UltraWinGrid.UltraGridBase.DataSource_Disposed(Object sender, EventArgs e)
at System.ComponentModel.Component.Dispose(Boolean disposing)
at System.Windows.Forms.BindingSource.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at System.ComponentModel.Container.Dispose(Boolean disposing)
at System.ComponentModel.Container.Dispose()
The crashes are random. We couldn't reproduce them in our tests, but our customers say that in most of the cases the crash occures when they close an MDI tab or the main application window.
Prior to 10.2 the crashes had been originating from UltraWinToolbars only. We released a new build based on 10.2 couple days ago and now we are seeing similar problem with UltraTreeView also. Here is the stack trace:
-------------------------Stack trace------------------------- System.ArgumentException Parameter is not valid. ---------------------------------------------------------------------- at System.Drawing.Graphics.GetHdc() ---------------------------------------------------------------------- at System.Windows.Forms.Internal.WindowsGraphics.FromGraphics(Graphics g, ApplyGraphicsProperties properties) ---------------------------------------------------------------------- at System.Windows.Forms.WindowsGraphicsWrapper..ctor(IDeviceContext idc, TextFormatFlags flags) ---------------------------------------------------------------------- at System.Windows.Forms.TextRenderer.MeasureText(IDeviceContext dc, String text, Font font, Size proposedSize, TextFormatFlags flags) ---------------------------------------------------------------------- at Infragistics.Win.DrawUtility.MeasureStringHelper(Graphics gr, String text, Font font, Size layoutArea, StringFormat stringFormat, Int32& charactersFitted, Int32& linesFilled, Boolean returnElementsFitted, GdiDrawStringFlags drawStringFlags) ---------------------------------------------------------------------- at Infragistics.Win.DrawUtility.MeasureString(Graphics gr, String text, Font font, GdiDrawStringFlags drawStringFlags) ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.CalculateLabelSize(Graphics gr, Font font, String text, Boolean multiline, Boolean addExtraSpaceWhileEditing, Int32 maxWidth, Int32 maxHeight, Boolean constrained) ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.CalcItemSizeInternal(Int32& height, Int32& width) ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.get_Size() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.get_ItemHeightResolved() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.get_ItemHeightResolvedWithSpacing() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.VisibleNodesManager.CalculateMaxTopNodeVisibleIndex() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.VisibleNodesManager.get_MaxTopNodeVisibleIndex() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.VisibleNodesManager.VerifyScrollBoundsForTopNode() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.VisibleNodesManager.Reinitialize() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.get_VisibleIndex() ---------------------------------------------------------------------- at Infragistics.Win.UltraWinTree.UltraTreeNode.internalExpand(Boolean value, Boolean notify, Boolean updateVisibleNodes)
Hi,
As per Brian's post on the thread you linked here, there's no reason for the issue he was referring to to still be occurring in 10.2 and certainly not in the latest service release.
So whatever is occurring here must be a different issue. So in order to look into this, we would need to be able to duplicate the issue. There's no way we can fix something we cannot see. Even if we tried to fix it, how would we know? :)
Are you able to reproduce the issue in a small sample project?
We currently use 10.2.20102.2026. Our application has error reporting feature and we receive around 5 to 10 crash reports per day from different customers with exactly the same error stack trace.
Something has to be done about it. The problem first appeared as soon as we upgraded from 9.2 to the 10.1 and it is still present in the 10.2.
Do you have the latest service release for v10.2?
If not, then I recommend you get it and see if that clears up the issue.
How to get the latest service release - Infragistics Community
If that does not help, then are you able to reproduce this issue in a sample project and post it here so we can check it out?
Mike, the same crash occures with the latest patched 10.2. Please take a look on this thread:http://community.infragistics.com/forums/p/41053/240907.aspx
We are having crashes with WinToolbar and TreeView components.