Closed zxp19821005 closed 1 year ago
@zxp19821005 根據 https://github.com/AvaloniaUI/Avalonia/issues/4427 看起來是在 ArchLinux 上會出現的問題,我們會嘗試將預設字體內嵌以解決此問題,但應該會在 3.0 上修正。
好的,谢谢!
@zxp19821005 可以確認下 3.0.2.610 是否有修正此問題,謝謝。
似乎问题依旧?
$ /opt/ulogviewer/ULogViewer
Unhandled exception. System.InvalidOperationException: Default font family name can't be null or empty.
at Avalonia.Media.FontManager..ctor(IFontManagerImpl) in /_/src/Avalonia.Base/Media/FontManager.cs:line 33
at Avalonia.Media.FontManager.get_Current() in /_/src/Avalonia.Base/Media/FontManager.cs:line 53
at Avalonia.Media.Typeface.get_GlyphTypeface() in /_/src/Avalonia.Base/Media/Typeface.cs:line 84
at Avalonia.Rendering.Composition.Server.ServerCompositionTarget..ctor(ServerCompositor, Func`1) in /_/src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:line 28
at Avalonia.Rendering.Composition.Compositor.CreateCompositionTarget(Func`1) in /_/src/Avalonia.Base/Rendering/Composition/Compositor.Factories.cs:line 17
at Avalonia.Rendering.Composition.CompositingRenderer..ctor(IRenderRoot, Compositor) in /_/src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs:line 47
at Avalonia.X11.X11Window.CreateRenderer(IRenderRoot root) in /_/src/Avalonia.X11/X11Window.cs:line 394
at Avalonia.Controls.TopLevel..ctor(ITopLevelImpl impl, IAvaloniaDependencyResolver dependencyResolver) in /_/src/Avalonia.Controls/TopLevel.cs:line 147
at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl, IAvaloniaDependencyResolver dependencyResolver) in /_/src/Avalonia.Controls/WindowBase.cs:line 61
at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl) in /_/src/Avalonia.Controls/WindowBase.cs:line 57
at Avalonia.Controls.Window..ctor(IWindowImpl impl) in /_/src/Avalonia.Controls/Window.cs:line 230
at Avalonia.Controls.Window..ctor() in /_/src/Avalonia.Controls/Window.cs:line 221
at CarinaStudio.AppSuite.Controls.SplashWindowImpl..ctor()
at CarinaStudio.AppSuite.AppSuiteApplication.OnPrepareStartingAsync()
at CarinaStudio.ULogViewer.App.OnPrepareStartingAsync() in /Users/carina/Studio/ULogViewer/ULogViewer/App.axaml.cs:line 515
at CarinaStudio.AppSuite.AppSuiteApplication.<>c__DisplayClass253_0.<<OnFrameworkInitializationCompleted>b__6>d.MoveNext()
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.JobRunner.JobWithArg.Avalonia.Threading.JobRunner.IJob.Run() in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 241
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 38
at Avalonia.X11.X11PlatformThreading.CheckSignaled() in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 164
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 244
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
at CarinaStudio.ULogViewer.App.Main(String[] args) in /Users/carina/Studio/ULogViewer/ULogViewer/App.axaml.cs:line 219
[1] 67837 IOT instruction (core dumped) /opt/ulogviewer/ULogViewer
而且不知道咱们软件的配置文件在哪里?是否修改配置文件可以解决这个问题呢?我看了下~/.config
目录,没有生成配置文件目录。
而且我是将文件安装到了/opt/ulogviewer/
,本身读写就受限,默认应该是755(-rwxr-xr-x
),前面在另外一款软件遇到过这个问题。
另,刚才看了下软件安装目录,部分dll的权限是744,但是大部分dll文件的权限是644。
ULogViewer 所有需要的文件都放在自身的目錄中 (即 /opt/ulogviewer/),相關的配置文件也沒有字型相關的。我這邊會直接在 Arch Linux ARM64 上看下這個問題。
@zxp19821005 3.0.3.620 修正了無法在非英語環境之 Linux 上啟動的問題。
已经能够正常运行了,谢谢!
我将软件包移植到了ArchLinux,目前未发布到AUR。PKGBUILD文件如下:
打包安装之后,点击图标无反应,在终端下执行报错:
看报错信息似乎是因为默认字体为空导致的?