Avalonia 11.0-Preview3 System.ArgumentNullException:“Value cannot be null. Arg_ParamName_Name”
See original GitHub issueDescribe the bug The exception will throw when changing the value of ResourceDictionaries or updating Style.
To Reproduce Update the resource dictionary will trigger the exception.
Avalonia.Base.dll!Avalonia.Media.FontFamily.FontFamily(System.Uri baseUri, string name)
Avalonia.Skia.dll!Avalonia.Skia.FontManagerImpl.TryMatchCharacter(int codepoint, Avalonia.Media.FontStyle fontStyle, Avalonia.Media.FontWeight fontWeight, Avalonia.Media.FontStretch fontStretch, Avalonia.Media.FontFamily fontFamily, System.Globalization.CultureInfo culture, out Avalonia.Media.Typeface fontKey)
Avalonia.Base.dll!Avalonia.Media.FontManager.TryMatchCharacter(int codepoint, Avalonia.Media.FontStyle fontStyle, Avalonia.Media.FontWeight fontWeight, Avalonia.Media.FontStretch fontStretch, Avalonia.Media.FontFamily fontFamily, System.Globalization.CultureInfo culture, out Avalonia.Media.Typeface typeface)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextCharacters.CreateShapeableRun(Avalonia.Utilities.ReadOnlySlice<char> text, Avalonia.Media.TextFormatting.TextRunProperties defaultProperties, sbyte biDiLevel, ref Avalonia.Media.TextFormatting.TextRunProperties previousProperties)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextCharacters.GetShapeableCharacters(Avalonia.Utilities.ReadOnlySlice<char> runText, sbyte biDiLevel, ref Avalonia.Media.TextFormatting.TextRunProperties previousProperties)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextFormatterImpl.CoalesceLevels(System.Collections.Generic.IReadOnlyList<Avalonia.Media.TextFormatting.TextRun> textCharacters, Avalonia.Utilities.ArraySlice<sbyte> levels)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextFormatterImpl.ShapeTextRuns(System.Collections.Generic.List<Avalonia.Media.TextFormatting.TextRun> textRuns, Avalonia.Media.TextFormatting.TextParagraphProperties paragraphProperties, out Avalonia.Media.FlowDirection resolvedFlowDirection)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextFormatterImpl.FormatLine(Avalonia.Media.TextFormatting.ITextSource textSource, int firstTextSourceIndex, double paragraphWidth, Avalonia.Media.TextFormatting.TextParagraphProperties paragraphProperties, Avalonia.Media.TextFormatting.TextLineBreak previousLineBreak)
Avalonia.Base.dll!Avalonia.Media.TextFormatting.TextLayout.CreateTextLines()
Avalonia.Controls.dll!Avalonia.Controls.TextBlock.CreateTextLayout(string text)
Avalonia.Controls.dll!Avalonia.Controls.TextBlock.Render(Avalonia.Media.DrawingContext context)
Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.UpdateCore()
Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.Update(System.Threading.Tasks.Task batchCompletion)
Avalonia.Base.dll!Avalonia.Rendering.Composition.Compositor.Commit()
Avalonia.Base.dll!Avalonia.Rendering.Composition.CompositingRenderer.Dispose()
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleClosed()
Avalonia.Controls.dll!Avalonia.Controls.WindowBase.HandleClosed()
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)
[本机到托管的转换]
[托管到本机的转换]
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.Dispose()
Avalonia.Controls.dll!Avalonia.Controls.Primitives.PopupRoot.Dispose()
System.Reactive.dll!System.Reactive.Disposables.AnonymousDisposable<(Avalonia.Controls.Primitives.IPopupHost, System.Reactive.Disposables.CompositeDisposable)>.Dispose()
Avalonia.Controls.dll!Avalonia.Controls.Primitives.Popup.CloseCore()
Avalonia.Controls.dll!Avalonia.Controls.ComboBox.OnPointerReleased(Avalonia.Input.PointerReleasedEventArgs e)
System.Reactive.dll!System.Reactive.Subjects.Subject<(object, Avalonia.Interactivity.RoutedEventArgs)>.OnNext((object, Avalonia.Interactivity.RoutedEventArgs) value)
Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEventImpl(Avalonia.Interactivity.RoutedEventArgs e)
Avalonia.Base.dll!Avalonia.Interactivity.EventRoute.RaiseEvent(Avalonia.Interactivity.IInteractive source, Avalonia.Interactivity.RoutedEventArgs e)
Avalonia.Base.dll!Avalonia.Interactivity.Interactive.RaiseEvent(Avalonia.Interactivity.RoutedEventArgs e)
Avalonia.Base.dll!Avalonia.Input.MouseDevice.MouseUp(Avalonia.Input.IMouseDevice device, ulong timestamp, Avalonia.Input.IInputRoot root, Avalonia.Point p, Avalonia.Input.PointerPointProperties props, Avalonia.Input.KeyModifiers inputModifiers, Avalonia.Input.IInputElement hitTest)
Avalonia.Base.dll!Avalonia.Input.MouseDevice.ProcessRawEvent(Avalonia.Input.Raw.RawPointerEventArgs e)
Avalonia.Base.dll!Avalonia.Input.InputManager.ProcessInput(Avalonia.Input.Raw.RawInputEventArgs e)
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.HandleInput(Avalonia.Input.Raw.RawInputEventArgs e)
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.AppWndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)
Avalonia.Win32.dll!Avalonia.Win32.WindowImpl.WndProc(System.IntPtr hWnd, uint msg, System.IntPtr wParam, System.IntPtr lParam)
[本机到托管的转换]
[托管到本机的转换]
Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.RunLoop(System.Threading.CancellationToken cancellationToken)
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)
Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args)
> LauncherX.Avalonia.dll!LauncherX.Avalonia.Program.Main(string[] args) Line 15 C#
Expected behavior Resources should update successfully without throw any exception.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Version Avalonia 11.0 Preview3
Issue Analytics
- State:
- Created 10 months ago
- Comments:29 (14 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timunie Here is the screen record:
It seems this issue has been resolved in the latest nightly build. SO I’ll just close it.