Skip to content

Debian 13 下因为字体不存在导致启动器崩溃 #75

Description

@JackA1ltman

检查清单

  • 我已更新到最新版 最新的版本号 测试,并看过最新提交,确认这一 Bug 还没有修复。
  • 我已在 Issues 中检索,确认这一 Bug 未被提交过。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题(关于其他非程序本身的问题应当在 Discussion 板块提出)。

期望的行为

正常启动(采用其他字体)
或者提示字体缺少并要求用户手动下载安装对应字体

实际结果

Debian 13 环境下不存在Consolas 和 D-DIN Pro字体,导致启动过程中启动器卡死
在嵌入Consolas字体以前,甚至只能通过终端提取报错信息

Debian 13 下的确没有那么多字体可供选择,且安装也不太方便(至少和AUR相比要麻烦不少)

重现步骤

直接启动即可

以下是导出的日志:
20260717160926.json

堆栈跟踪(可选)

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Could not create glyphTypeface. Font family: DINPro (key: compositefont:DINPro, Noto Sans SC). Style: Normal. Weight: Normal. Stretch: Normal)
 ---> System.InvalidOperationException: Could not create glyphTypeface. Font family: DINPro (key: compositefont:DINPro, Noto Sans SC). Style: Normal. Weight: Normal. Stretch: Normal
   at Avalonia.Media.Typeface.get_GlyphTypeface()
   at Avalonia.Media.TextFormatting.TextRunProperties.get_CachedGlyphTypeface()
   at Avalonia.Media.TextFormatting.TextCharacters.CreateShapeableRun(ReadOnlyMemory`1 text, TextRunProperties defaultProperties, SByte biDiLevel, FontManager fontManager, TextRunProperties& previousProperties)
   at Avalonia.Media.TextFormatting.TextCharacters.GetShapeableCharacters(ReadOnlyMemory`1 text, SByte biDiLevel, FontManager fontManager, TextRunProperties& previousProperties, RentedList`1 results)
   at Avalonia.Media.TextFormatting.TextFormatterImpl.CoalesceLevels(IReadOnlyList`1 textCharacters, ReadOnlySpan`1 levels, FontManager fontManager, RentedList`1 processedRuns)
   at Avalonia.Media.TextFormatting.TextFormatterImpl.ShapeTextRuns(IReadOnlyList`1 textRuns, TextParagraphProperties paragraphProperties, FormattingObjectPool objectPool, FontManager fontManager, FlowDirection& resolvedFlowDirection)
   at Avalonia.Media.TextFormatting.TextFormatterImpl.FormatLine(ITextSource textSource, Int32 firstTextSourceIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   at Avalonia.Media.TextFormatting.TextLayout.CreateTextLines()
   at Avalonia.Media.TextFormatting.TextLayout..ctor(ITextSource textSource, TextParagraphProperties paragraphProperties, TextTrimming textTrimming, Double maxWidth, Double maxHeight, Int32 maxLines, TextRunCache textRunCache)
   at Avalonia.Controls.TextBlock.CreateTextLayout(String text)
   at Avalonia.Controls.TextBlock.get_TextLayout()
   at Avalonia.Controls.TextBlock.RenderCore(DrawingContext context)
   at Avalonia.Controls.TextBlock.Render(DrawingContext context)
   at Avalonia.Rendering.Composition.CompositingRenderer.UpdateCore()
   at Avalonia.Rendering.Composition.CompositingRenderer.Update()
   at Avalonia.Rendering.Composition.Compositor.CommitCore()
   at Avalonia.Rendering.Composition.Compositor.Commit()
   at Avalonia.Media.MediaContext.CommitCompositor(Compositor compositor)
   at Avalonia.Media.MediaContext.SyncCommit(Compositor compositor, Boolean waitFullRender, Boolean catchExceptions)
   at Avalonia.Media.MediaContext.ImmediateRenderRequested(CompositionTarget target, Boolean catchExceptions)
   at Avalonia.Rendering.Composition.CompositingRenderer.Paint(Rect rect, Boolean catchExceptions)
   at Avalonia.Rendering.Composition.CompositingRenderer.Paint(Rect rect)
   at Avalonia.Controls.TopLevel.HandlePaint(Rect rect)
   at Avalonia.X11.X11Window.DoPaint()
   at Avalonia.X11.X11Window.<EnqueuePaint>b__156_0()
   at Avalonia.Threading.DispatcherOperation.InvokeCore()
   --- End of inner exception stack trace ---

应用版本

v2.1.9.94

操作系统版本

Debian 13 Stable

最后一步

  • 我认为上述的描述已经足以详细,以允许开发人员能复现该问题。如果我的 issue 没有按照上述的要求填写,可能会被无条件关闭。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions