Skip to content

Crashes and fails to startup if font family name is an empty space #745

@HeyLito

Description

@HeyLito

Crash Log:

Crash::: System.ArgumentNullException: Value cannot be null. (Parameter 'name')

----------------------------
Version: 8.40.0.0
OS: Microsoft Windows NT 10.0.22631.0
Framework: .NETCoreApp,Version=v9.0
Source: <unknown>
---------------------------

   at Avalonia.Media.FontFamily..ctor(Uri, String) + 0x376
   at Avalonia.Media.Fonts.SystemFontCollection.TryGetGlyphTypeface(String, FontStyle, FontWeight, FontStretch, IGlyphTypeface&) + 0xda
   at Avalonia.Media.FontManager.TryGetGlyphTypefaceByKeyAndName(Typeface, FontFamilyKey, String, IGlyphTypeface&) + 0xba
   at Avalonia.Media.FontManager.TryGetGlyphTypeface(Typeface, IGlyphTypeface&) + 0x158
   at Avalonia.Media.Typeface.get_GlyphTypeface() + 0x51
   at Avalonia.Media.TextFormatting.TextRunProperties.get_CachedGlyphTypeface() + 0x7d
   at Avalonia.Media.TextFormatting.TextCharacters.CreateShapeableRun(ReadOnlyMemory`1, TextRunProperties, SByte, FontManager, TextRunProperties&) + 0xe3
   at Avalonia.Media.TextFormatting.TextCharacters.GetShapeableCharacters(ReadOnlyMemory`1, SByte, FontManager, TextRunProperties&, FormattingObjectPool.RentedList`1) + 0x72
   at Avalonia.Media.TextFormatting.TextFormatterImpl.CoalesceLevels(IReadOnlyList`1, ReadOnlySpan`1, FontManager, FormattingObjectPool.RentedList`1) + 0x3c9
   at Avalonia.Media.TextFormatting.TextFormatterImpl.ShapeTextRuns(IReadOnlyList`1, TextParagraphProperties, FormattingObjectPool, FontManager, FlowDirection&) + 0x3aa
   at Avalonia.Media.TextFormatting.TextFormatterImpl.FormatLine(ITextSource, Int32, Double, TextParagraphProperties, TextLineBreak) + 0x11c
   at Avalonia.Media.TextFormatting.TextLayout.CreateTextLines() + 0x196
   at Avalonia.Media.TextFormatting.TextLayout..ctor(ITextSource, TextParagraphProperties, TextTrimming, Double, Double, Int32) + 0x96
   at Avalonia.Controls.TextBlock.CreateTextLayout(String) + 0x314
   at Avalonia.Controls.TextBlock.get_TextLayout() + 0x4c
   at Avalonia.Controls.TextBlock.MeasureOverride(Size) + 0x198
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x449
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness, Thickness) + 0x183
   at Avalonia.Controls.Border.MeasureOverride(Size) + 0x96
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness, Thickness) + 0x183
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size) + 0x71
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.StackPanel.MeasureOverride(Size) + 0x1db
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Presenters.ScrollContentPresenter.MeasureOverride(Size) + 0xd8
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x557
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness, Thickness) + 0x183
   at Avalonia.Controls.Border.MeasureOverride(Size) + 0x96
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.StackPanel.MeasureOverride(Size) + 0x1db
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Presenters.ScrollContentPresenter.MeasureOverride(Size) + 0xd8
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x449
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x449
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness, Thickness) + 0x183
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size) + 0x71
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x449
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Controls.Grid.MeasureCell(Int32, Boolean) + 0x12b
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32, Size, Boolean, Boolean, Boolean&) + 0xb0
   at Avalonia.Controls.Grid.MeasureOverride(Size) + 0x5b5
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness, Thickness) + 0x183
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size) + 0x71
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable, Size, Thickness) + 0xbc
   at Avalonia.Controls.Primitives.VisualLayerManager.MeasureOverride(Size) + 0xb6
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Layout.Layoutable.MeasureCore(Size) + 0x197
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.Layoutable.MeasureOverride(Size) + 0x7f
   at Avalonia.Controls.Window.MeasureOverride(Size) + 0x1b2
   at Avalonia.Controls.WindowBase.MeasureCore(Size) + 0x52
   at Avalonia.Layout.Layoutable.Measure(Size) + 0xe6
   at Avalonia.Layout.LayoutManager.Measure(Layoutable) + 0xe8
   at Avalonia.Layout.LayoutManager.ExecuteInitialLayoutPass() + 0x21
   at Avalonia.Controls.Window.ShowCore(Window) + 0x267
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.ShowMainWindow() + 0x16
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[]) + 0x32
   at SourceGit.App.Main(String[] args) + 0xe6

Preferences:

{
  "Locale": "en_US",
  "Theme": "Dark",
  "ThemeOverrides": "",
  "DefaultFontFamily": "Arial",
  "MonospaceFontFamily": " ",
  "OnlyUseMonoFontInEditor": false,
  "UseSystemWindowFrame": false,
  "DefaultFontSize": 14,
  "EditorFontSize": 13,
  "Layout": {
    "LauncherWidth": 2122,
    "LauncherHeight": 997,
    "LauncherWindowState": 1,
    "RepositorySidebarWidth": 250,
    "HistoriesAuthorColumnWidth": 120,
    "WorkingCopyLeftWidth": 701,
    "StashesLeftWidth": 300,
    "CommitDetailChangesLeftWidth": 256,
    "CommitDetailFilesLeftWidth": 256
  },
  ...
  ...
  ...
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions