Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
490
October Service Release (8.3.20083.2122) ArgumentException - Parameter is not valid.
posted

After installing the 2122 service release (from build 1009) our application will no longer run.
We get an unhandled ArgumentException of "Parameter is not valid."
This occurs in the InitializeComponent method of our startup form. Specifically it is on the following line.

((System.ComponentModel.ISupportInitialize)(this.ultraDockManager1)).EndInit();

Our application uses the ribbon control. Using VS2008 on an XP 64 bit system.

Deleting the Dock Manager control results in the same exception being thrown at some point later in the code. Following is a portion of the stack trace with this later occurrence.

 

 

   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.FormattedLinkLabel.PositionElementsCache.MeasureTextGDIOrThemed(String text, Font font, StringFormat sf)
   at Infragistics.Win.FormattedLinkLabel.PositionElementsCache.MeasureCharacterRangesGDI(String text, Font font, StringFormat sf, CharacterRange[] ranges)
   at Infragistics.Win.FormattedLinkLabel.PositionElementsCache.ReMeasureParts(String text, Int32[] parts, Single[] widths, Int32 partStartIndex, Int32 partEndIndex, Font font, Single& lineHeight)
   at Infragistics.Win.FormattedLinkLabel.NodeText.TextLayoutInfo.Measure(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeText.PositionSelf(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeBase.Position(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeBase.PositionChildNodes(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeBlock.PositionChildNodes(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeBase.Position(PositionElementsInfo& info)
   at Infragistics.Win.FormattedLinkLabel.NodeBase.CalcSize(IFormattedLinkLabelOwner owner, Graphics graphics, Int32 maxWidth)
   at Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.CalcSize(Control control, AppearanceData& defaultAppearance, Int32 widthConstraint, DefaultableBoolean wrapText)
   at Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.CalcSize(Control control, AppearanceData& defaultAppearance, Int32 widthConstraint)
   at Infragistics.Win.UltraWinToolbars.Ribbon.RibbonMetrics.CalculateCaptionAreaHeight()
   at Infragistics.Win.UltraWinToolbars.Ribbon.RibbonMetrics.get_CaptionAreaHeight()
   at Infragistics.Win.UltraWinToolbars.Ribbon.RibbonMetrics.get_RibbonHeight()
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.RefreshDockAreaSize(Size& currentSize)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
   at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
   at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
   at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
   at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
   at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
   at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.Form.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
   at System.Windows.Forms.Control.OnResize(EventArgs e)
   at System.Windows.Forms.Form.OnResize(EventArgs e)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

 

I'm curious if this has happened to anyone else.

Thank you.

 

  • 520
    Suggested Answer
    Offline posted

    Hi,

    I also get this kind of error after installing the hotfix 2009.2.2035 for WinForms. I updated from 2009.2.1003. In version 1003 exporting a ultrawingrid to excel works well. Now when I export the following error occurs:

       bei System.Drawing.Graphics.GetHdc()
       bei System.Windows.Forms.Internal.WindowsGraphics.FromGraphics(Graphics g, ApplyGraphicsProperties properties)
       bei System.Windows.Forms.WindowsGraphicsWrapper..ctor(IDeviceContext idc, TextFormatFlags flags)
       bei System.Windows.Forms.TextRenderer.MeasureText(IDeviceContext dc, String text, Font font, Size proposedSize, TextFormatFlags flags)
       bei Infragistics.Win.DrawUtility.MeasureStringHelper(Graphics gr, String text, Font font, Size layoutArea, StringFormat stringFormat, Int32& charactersFitted, Int32& linesFilled, Boolean returnElementsFitted, GdiDrawStringFlags drawStringFlags)
       bei Infragistics.Win.DrawUtility.MeasureString(Graphics gr, String text, Font font, GdiDrawStringFlags drawStringFlags)
       bei Infragistics.Win.DrawUtility.MeasureString(Graphics gr, String text, Font font, EmbeddableEditorOwnerBase owner, Object ownerContext)
       bei Infragistics.Win.EmbeddableEditorBase.GetTextSizeOfValue(EmbeddableEditorOwnerBase owner, Object ownerContext, Boolean allowMultiline, Int32 maxWidth, Boolean isTooltip)
       bei Infragistics.Win.EditorWithText.InternalGetSize(EmbeddableEditorOwnerBase owner, Object ownerContext, Boolean valueOnly, Boolean full, Boolean includeBorders, Int32 maxTextWidth, Boolean allowMultiline, Boolean includeOwnerPadding, Boolean isTooltip)
       bei Infragistics.Win.EditorWithText.GetSize(EditorSizeInfo& sizeInfo)
       bei Infragistics.Win.EmbeddableEditorBase.GetSize(EmbeddableEditorOwnerBase owner, Object ownerContext, Boolean valueOnly, Boolean full, Boolean borders, Int32 maxTextWidth)
       bei Infragistics.Win.UltraWinGrid.RowAutoSizeLayoutManagerHolder.RowAutoSizeCalculator.GetIdealCellSize(UltraGridColumn column)
       bei Infragistics.Win.UltraWinGrid.UltraGridRow.CalculateAutoHeight()
       bei Infragistics.Win.UltraWinGrid.UltraGridRow.get_HeightIncludingPadding()
       bei Infragistics.Win.UltraWinGrid.UltraGridRow.get_BaseHeight()
       bei Infragistics.Win.UltraWinGrid.UltraGridRow.get_TotalHeight()
       bei Infragistics.Win.UltraWinGrid.VisibleRow.GetTotalHeight(Boolean adjustForOverlappedBorders)
       bei Infragistics.Win.UltraWinGrid.VisibleRow.GetTotalHeight()
       bei Infragistics.Win.UltraWinGrid.ViewStyleOutlookGroupBy.OrientVisibleRowForward(VisibleRowFetchRowContext& context, VisibleRow visibleRow)
       bei Infragistics.Win.UltraWinGrid.ViewStyleBase.InsertRow(VisibleRowFetchRowContext& context, VisibleRow visibleRow, Boolean insertDescendantRows)
       bei Infragistics.Win.UltraWinGrid.ViewStyleBase.AddSiblingRows(VisibleRowFetchRowContext& context, VisibleRow parentVisibleRow, UltraGridRow firstSibling)
       bei Infragistics.Win.UltraWinGrid.ViewStyleBase.RecreateRowList(RowScrollRegion rsr)
       bei Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows(Boolean resetScrollInfo)
       bei Infragistics.Win.UltraWinGrid.RowScrollRegion.RegenerateVisibleRows()
       bei Infragistics.Win.UltraWinGrid.RowScrollRegion.WillScrollbarBeShown(ScrollbarVisibility assumeColScrollbarsVisible)
       bei Infragistics.Win.UltraWinGrid.ScrollRegionBase.WillScrollbarBeShown()
       bei Infragistics.Win.UltraWinGrid.ViewStyleBase.AddBandHeaders(ColScrollRegion csr, UltraGridBand band)
       bei Infragistics.Win.UltraWinGrid.ViewStyleVertical.RecreateHeaderList(ColScrollRegion csr)
       bei Infragistics.Win.UltraWinGrid.ColScrollRegion.RegenerateVisibleHeaders()
       bei Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetricsHelper()
       bei Infragistics.Win.UltraWinGrid.ColScrollRegionsCollection.InitializeMetrics()
       bei Infragistics.Win.UltraWinGrid.UltraGridLayout.ApplyLoadedBands()
       bei Infragistics.Win.UltraWinGrid.UltraGrid.Export(IUltraGridExporter exporter)
       bei Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.Export(UltraGrid grid, Worksheet worksheet, Int32 startRow, Int32 startColumn)
       bei IBIS.WiPakRBEPlusClasses.cGenerateExcelSheet.GenerateExcelSheet(Workbook& oExcel, Boolean& bHasCheckLogic, Boolean& bHasContent) in D:\VS2005\WiPak\WiPak-Framework\WiPakRBEPlusClasses\cGenerateExcelSheet.vb:Zeile 513.

    I reinstalled 2009.2.1003 and the export is working. So the hotfix is destroying my application. I also tried to install the hotfix 2017 with the same result as in .2035.

    Thank you for any help!

    Cheers

    Michael