I've just had a report of my Avalonia app not starting up with build 0.8.999-cibuild0004171-beta
Main error
Object reference not set to an instance of an object.
Avalonia.X11
Void .ctor(Avalonia.X11.AvaloniaX11Platform, Avalonia.Platform.IWindowImpl)
at Avalonia.X11.X11Window..ctor(AvaloniaX11Platform platform, IWindowImpl popupParent)
at Avalonia.X11.AvaloniaX11Platform.CreateWindow()
at Avalonia.Controls.Platform.PlatformManager.CreateWindow()
at Avalonia.Controls.Window..ctor()
at SparkSDR.avalonia.Views.MainWindow..ctor()
at SparkSDR.avalonia.App.OnFrameworkInitializationCompleted()
at Avalonia.Controls.AppBuilderBase`1.Setup()
at Avalonia.Controls.AppBuilderBase`1.SetupWithoutStarting()
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
at SparkSDR.avalonia.Program.Main(String[] args)
I'm waiting for further info on linux version
What Linux are you using?. While using Debian 10 (WSL) it works but on arch Linux it seems to fail. Also, are you using a splash screen/loading screen that opens up before main window?
There is no splash screen, just standard Avalonia startup.
I'm waiting on the user to find out the linux version. It works locally for me on Mint and also on one of the users other linux boxes.
An older version using 0.8.1-cibuild0003019-beta works on the problem box.
Yes I am having the same problem where some user reported a similar exception on Arch Linux.
Probably monitor here is null - https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.X11/X11Window.cs#L105
@jmacato
@AvaloniaUI/core
I think we should ban using IDEs not powered by JetBrains tooling for the core team. This error would be detected by ReSharper/Rider way before commiting the code to the repo.
Also, what happened to our Resharper command line tools build step? I remember setting up null checks a year or two ago.
Probably
monitorhere is null - https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.X11/X11Window.cs#L105
This adds up as I believe the user has a remote computer which may well not have a monitor.
@kekekeks Yeah, i think that's the cause. About Rider, it really impedes my workflow and has slow compile times (probably just my machine but still, vscode is way way more usable than it on linux.)
@ahopper Probably unrelated but sometimes a "XOpenDisplay failed" exception is observed when a physical monitor is not connected. If you want software like TeamViewer to work you have to use the xserver-xorg-video-dummy package on Ubuntu 19.04.
The problem computer is running Mint 19.2 with xfce and no monitor (it is a remote radio station monitored over vnc).