Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationView with Toolkit and Material causes TextBlock exception #10494

Closed
jeromelaban opened this issue Nov 19, 2022 Discussed in #10492 · 0 comments · Fixed by #10499
Closed

NavigationView with Toolkit and Material causes TextBlock exception #10494

jeromelaban opened this issue Nov 19, 2022 Discussed in #10492 · 0 comments · Fixed by #10499
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/bug Something isn't working platform/gtk Categorizes an issue or PR as relevant to GTK project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)

Comments

@jeromelaban
Copy link
Member

jeromelaban commented Nov 19, 2022

Discussed in #10492

Removing <MaterialResources xmlns="using:Uno.Material" /> and <MaterialToolkitResources xmlns="using:Uno.Toolkit.UI.Material" /> in App.xaml avoids the failure.

Sample: guiUno.zip

fail: Uno.UI.Dispatching.CoreDispatcher[0]
      Dispatcher unhandled exception
      System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
         at System.Collections.Generic.List`1.get_Item(Int32 index)
         at Microsoft.UI.Xaml.Documents.InlineCollection.Measure(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/Documents/InlineCollection.skia.cs:line 0
         at Microsoft.UI.Xaml.Controls.TextBlock.MeasureOverride(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.skia.cs:line 37
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.Layout.netstd.cs:line 99
         at Microsoft.UI.Xaml.FrameworkElement.MeasureCore(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.Layout.netstd.cs:line 78
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/UIElement.Layout.netstd.cs:line 184
         at Microsoft.UI.Xaml.FrameworkElement.MeasureElement(UIElement view, Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.cs:line 308
         at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.cs:line 228
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.Layout.netstd.cs:line 99
         at Microsoft.UI.Xaml.FrameworkElement.MeasureCore(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.Layout.netstd.cs:line 78
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/UIElement.Layout.netstd.cs:line 184
         at Microsoft.UI.Xaml.Controls.Grid.MeasureOverride(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/Controls/Grid/Grid.cs:line 1045
...
         at Microsoft.UI.Xaml.FrameworkElement.MeasureCore(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/FrameworkElement.Layout.netstd.cs:line 78
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in /__w/1/s/src/Uno.UI/UI/Xaml/UIElement.Layout.netstd.cs:line 179
         at Microsoft.UI.Xaml.XamlRoot.RunMeasureAndArrange() in /__w/1/s/src/Uno.UI/UI/Xaml/XamlRoot.netstd.cs:line 116
         at Microsoft.UI.Xaml.XamlRoot.<ScheduleInvalidateMeasureOrArrange>b__32_0() in /__w/1/s/src/Uno.UI/UI/Xaml/XamlRoot.netstd.cs:line 93
         at Uno.UI.Dispatching.CoreDispatcher.InvokeOperationSafe(UIAsyncOperation operation) in /__w/1/s/src/Uno.UI.Dispatching/Core/CoreDispatcher.cs:line 338
@jeromelaban jeromelaban added kind/bug Something isn't working area/skia ✏️ Categorizes an issue or PR as relevant to Skia project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …) platform/gtk Categorizes an issue or PR as relevant to GTK labels Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/bug Something isn't working platform/gtk Categorizes an issue or PR as relevant to GTK project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant