geefr / beatsaber-linux-goodies

Mod installation scripts and other goodies to support Beat Saber on Linux
BSD 2-Clause "Simplified" License
132 stars 5 forks source link

Beataroni launches without error, but no GUI displays #84

Closed ldv8434 closed 3 years ago

ldv8434 commented 3 years ago

Distro: Arch Linux Kernel: 5.11.2-arch1-1 Display server: X11 Desktop Environment: KDE5 Beataroni versions: 1.1.0 and 1.1.1

I recently made a second PC specifically for VR so I wouldn't need to drag my usual desktop to a room with more space. Beataroni works just fine on my first computer but won't do anything when launched on the new one.

Expected behavior: Beataroni will show GUI when launched with ./Beataroni Current behavior: When launching from terminal with ./Beataroni (or ./Beataroni-Linux.sh), the terminal will show no output but will not give another prompt. Launching from Dolphin with the .sh file shows no action either. No window is listed on the KDE panel or shown on screen.

Attempted fixes:

My guess is that there is a library or something that I haven't installed yet but need to for Beataroni to work. I'd prefer to not install every package from my desktop onto the VR PC.

geefr commented 3 years ago

Thanks for the detailed report. Could be related to #80 - But that one at least had an exception to say it's an error with Skia..

The main idea of the rewrite -> Beataroni was to switch over to .net, and package all dependencies in the one binary. This includes the .net 5 runtime, avalonia UI, and all of its dependencies. So there shouldn't be anything you need on your system in order to use it, other than I think X11 and OpenSSL (Not sure what skia needs for rendering).

It looks like there's been an update to Avalonia at least so I'll do an update at some point.

For reproducing locally I'm good on hardware / VM boxes, but had issues with the arch installer (or lack thereof, I'm a dummy). Do you think Manjaro would be close enough as arch + kde setup? I'm pretty sure things worked last time I tested but the packages do change quite frequently..

ldv8434 commented 3 years ago

Manjaro tends to include more packages by default than pure Arch does, so I don't know if I can recommend it as a 1:1 alternative to a fresh Arch install. I'm going to try some more debugging of dependency-installed packages and stuff on my side, but I can try packaging my Arch installation to a VM for you to use in testing.

geefr commented 3 years ago

No need for that, I doubt I'd have the time past a few quick tests. (lots of other work to do right now..)

I've done a double-check and manjaro latest + kde works.

There's an updated build here that has the latest avalonia and any of its dependencies. Interestingly avalonia now includes a copy of harfbuzz in the package that wasn't there in the last version.

Try the release here just in case. Either it's that, or this will be a difficult/long running issue to deal with.. https://github.com/geefr/beatsaber-linux-goodies/releases/tag/avalonia-0.1.0-test

ominitay commented 3 years ago

My Arch install works fine with it, and is fairly minimal...

ominitay commented 3 years ago

I could set up a basic Arch VM under QEMU if wanted.

ldv8434 commented 3 years ago

Just tested out the version you linked @geefr. It runs fine on the old PC, but on the new one it crashes because... I don't have a default font? This sounds like its an issue on my end but I'll include the output here for your reading pleasure:

Unhandled exception. System.InvalidOperationException: Default font family name can't be null or empty.
   at Avalonia.Media.FontManager..ctor(IFontManagerImpl platformImpl)
   at Avalonia.Media.FontManager.get_Current()
   at Avalonia.Media.TextFormatting.TextCharacters.TryGetRunProperties(ReadOnlySlice`1 text, Typeface typeface, Typeface defaultTypeface, Int32& count)
   at Avalonia.Media.TextFormatting.TextCharacters.CreateShapeableRun(ReadOnlySlice`1 text, TextRunProperties defaultProperties)
   at Avalonia.Media.TextFormatting.TextCharacters.GetShapeableCharacters()
   at Avalonia.Media.TextFormatting.TextFormatterImpl.FetchTextRuns(ITextSource textSource, Int32 firstTextSourceIndex, TextLineBreak previousLineBreak, TextLineBreak& nextLineBreak)
   at Avalonia.Media.TextFormatting.TextFormatterImpl.FormatLine(ITextSource textSource, Int32 firstTextSourceIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak)
   at Avalonia.Media.TextFormatting.TextLayout.UpdateLayout()
   at Avalonia.Media.TextFormatting.TextLayout..ctor(String text, Typeface typeface, Double fontSize, IBrush foreground, TextAlignment textAlignment, TextWrapping textWrapping, TextTrimming textTrimming, TextDecorationCollection textDecorations, Double maxWidth, Double maxHeight, Double lineHeight, Int32 maxLines, IReadOnlyList`1 textStyleOverrides)
   at Avalonia.Controls.TextBlock.CreateTextLayout(Size constraint, String text)
   at Avalonia.Controls.TextBlock.get_TextLayout()
   at Avalonia.Controls.TextBlock.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.StackPanel.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding)
   at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding)
   at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding)
   at Avalonia.Controls.Primitives.VisualLayerManager.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Controls.Window.MeasureOverride(Size availableSize)
   at Avalonia.Controls.WindowBase.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutManager.Measure(ILayoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteInitialLayoutPass()
   at Avalonia.Controls.Window.ShowCore(Window parent)
   at Avalonia.Controls.Window.Show()
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
   at Beataroni.Program.Main(String[] args)
Aborted (core dumped)
ldv8434 commented 3 years ago

After installing the ttf-ms-fonts package from the AUR, the new avalonia version works. I tested the old version too - it works now as well.

Is it possible that Avalonia doesn't work without access to Microsoft fonts?

geefr commented 3 years ago

I wasn't aware of such a restriction but it's certainly possible.

Looks like that chunk of code is calling through to platform-specific stuff, I think Skia in this case rather than X11, and that's returning a null default.

If you'd like you can raise a bug against Avalonia/skia, I'll go with the assumption that using .net on linux needs the microsoft fonts (Though oddly enough my ubuntu/mint boxes don't have corefonts and work fine).

Good to hear it's resolved in some form, thanks for detailed report/investigating. I'll wrap things up into the live release shortly.