Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

COMException when measuring a TextBlock

$
0
0

Hi,

Many of our customers face a seldom issue that we cannot reproduce, but for which we have many similar call stacks. Here is one of them:

System.Runtime.InteropServices.COMException (0x80004005): Exception de HRESULT : 0xFEED18D0 ---> System.Runtime.InteropServices.COMException (0xFEED18D0): Exception de HRESULT : 0xFEED18D0à System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   à System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo)
   à MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr)
   à MS.Internal.Text.TextInterface.TextAnalyzer.GetGlyphs(UInt16* textString, UInt32 textLength, Font font, UInt16 blankGlyphIndex, Boolean isSideways, Boolean isRightToLeft, CultureInfo cultureInfo, DWriteFontFeature[][] features, UInt32[] featureRangeLengths, UInt32 maxGlyphCount, TextFormattingMode textFormattingMode, ItemProps itemProps, UInt16* clusterMap, UInt16* textProps, UInt16* glyphIndices, UInt32* glyphProps, Int32* pfCanGlyphAlone, UInt32& actualGlyphCount)à MS.Internal.TextFormatting.LineServicesCallbacks.GetGlyphsRedefined(IntPtr pols, IntPtr* plsplsruns, Int32* pcchPlsrun, Int32 plsrunCount, Char* pwchText, Int32 cchText, LsTFlow textFlow, UInt16* puGlyphsBuffer, UInt32* piGlyphPropsBuffer, Int32 cgiGlyphBuffers, Int32& fIsGlyphBuffersUsed, UInt16* puClusterMap, UInt16* puCharProperties, Int32* pfCanGlyphAlone, Int32& glyphCount)à MS.Internal.TextFormatting.TextMetrics.FullTextLine.FormatLine(FullTextState fullText, Int32 cpFirst, Int32 lineLength, Int32 formatWidth, Int32 finiteFormatWidth, Int32 paragraphWidth, LineFlags lineFlags, FormattedTextSymbols collapsingSymbol)
   à MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   à MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   à System.Windows.Controls.TextBlock.OnRender(DrawingContext ctx)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
   à System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
   à System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.Controls.VirtualizingStackPanel.ArrangeOtherItemsInExtendedViewport(Boolean isHorizontal, UIElement child, Size childDesiredSize, Double arrangeLength, Int32 index, Rect& rcChild, Size& previousChildSize, Point& previousChildOffset, Int32& previousChildItemIndex)à System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize)
   à System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   à System.Windows.UIElement.Arrange(Rect finalRect)
   à System.Windows.ContextLayoutManager.UpdateLayout()
   à System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   à System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   à System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   à System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

I could find only very few information about this issue on the internet, but I created a Microsoft connect issue (I'm not allowed to post links ... thanks MS ...)

If you have any clue on why such an issue occurs and how I could avoid them to happen, please let me know !

Thanks.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>