TextBlock exception
See original GitHub issueUsing 0.9.999-cibuild0009164-beta I’m getting this exception, it happens after a few minutes of many textBlocks being updated. I’m afraid I don’t know the text that causes it.
Index was outside the bounds of the array.
Avalonia.Visuals
T get_Item(Int32)
at Avalonia.Utilities.ReadOnlySlice1.get_Item(Int32 index) at Avalonia.Media.TextFormatting.Unicode.Codepoint.ReadAt(ReadOnlySlice
1 text, Int32 index, Int32& count)
at Avalonia.Skia.TextShaperImpl.FillBuffer(Buffer buffer, ReadOnlySlice1 text) at Avalonia.Skia.TextShaperImpl.ShapeText(ReadOnlySlice
1 text, Typeface typeface, Double fontRenderingEmSize, CultureInfo culture)
at Avalonia.Media.TextFormatting.TextFormatterImpl.FetchTextRuns(ITextSource textSource, Int32 firstTextSourceIndex, TextLineBreak previousLineBreak, TextLineBreak& nextLineBreak)
at Avalonia.Media.TextFormatting.TextFormatterImpl.FormatLine(ITextSource textSource, Int32 firstTextSourceIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak)
at Avalonia.Media.TextFormatting.TextLayout.UpdateLayout()
at Avalonia.Media.TextFormatting.TextLayout…ctor(String text, Typeface typeface, Double fontSize, IBrush foreground, TextAlignment textAlignment, TextWrapping textWrapping, TextTrimming textTrimming, TextDecorationCollection textDecorations, Double maxWidth, Double maxHeight, Double lineHeight, Int32 maxLines, IReadOnlyList1 textStyleOverrides) at Avalonia.Controls.TextBlock.CreateTextLayout(Size constraint, String text) at Avalonia.Controls.TextBlock.get_TextLayout() at Avalonia.Controls.TextBlock.MeasureOverride(Size availableSize) at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) at Avalonia.Layout.Layoutable.Measure(Size availableSize) at Avalonia.Layout.LayoutManager.Measure(ILayoutable control) at Avalonia.Layout.LayoutManager.ExecuteMeasurePass() at Avalonia.Layout.LayoutManager.InnerLayoutPass() at Avalonia.Layout.LayoutManager.ExecuteLayoutPass() at Avalonia.Threading.JobRunner.RunJobs(Nullable
1 priority)
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)
0.9.999-cibuild0009225-beta
can be tested now. It reverts the default toNoWrap
so you don’t need to specify it explictitlyMy issue is fixed so I’ll close, hopefully it works for @ShadowDancer