StabilityMatrix icon indicating copy to clipboard operation
StabilityMatrix copied to clipboard

Attempting to launch Stability Matrix on Artix Linux fails with "Arithmetic operation resulted in an overflow"

Open frankspace opened this issue 7 months ago • 5 comments

What happened?

I am running Artix Linux with an AMD 7900XTX. I've tried both compiling Stability Matrix with this AUR build and installing the Appimage version from this AUR build, neither of which makes any difference: when I attempt to execute the StabilityMatrix.Avalonia executable, it fails with the following:

Setup:  took 301.52ms

16:56:32.786 WARN  Program: Unhandled "OverflowException": "Arithmetic operation resulted in an overflow." 
System.OverflowException: Arithmetic operation resulted in an overflow.
   at System.IntPtr.ToInt32()
   at Avalonia.X11.Screens.X11Screens.X11Screen.UpdateWorkArea()
   at Avalonia.X11.Screens.X11Screens.X11Screen.Refresh(MonitorInfo newInfo)
   at Avalonia.X11.Screens.X11Screens.ScreenChanged(X11Screen screen)
   at Avalonia.Platform.ScreensBase`2.ScreenAdded(TScreen screen)
   at Avalonia.Platform.ScreensBase`2.EnsureScreens()
   at Avalonia.Platform.ScreensBase`2.get_AllScreens()
   at Avalonia.X11.X11Window..ctor(AvaloniaX11Platform platform, IWindowImpl popupParent, X11WindowMode mode, Boolean overrideRedirect)
   at Avalonia.X11.X11Window..ctor(AvaloniaX11Platform platform, IWindowImpl popupParent, Boolean overrideRedirect)
   at Avalonia.X11.AvaloniaX11Platform.CreateWindow()
   at Avalonia.Controls.Platform.PlatformManager.CreateWindow()
   at Avalonia.Controls.Window..ctor()
   at FluentAvalonia.UI.Windowing.AppWindow..ctor()
   at StabilityMatrix.Avalonia.Controls.AppWindowBase..ctor() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Controls/AppWindowBase.cs:line 18
   at StabilityMatrix.Avalonia.Views.FirstLaunchSetupWindow..ctor() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Views/FirstLaunchSetupWindow.axaml.cs:line 15
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at StabilityMatrix.Avalonia.App.OnFrameworkInitializationCompleted() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/App.axaml.cs:line 182
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at StabilityMatrix.Avalonia.Program.Main(String[] args) in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Program.cs:line 150
Unhandled exception. System.OverflowException: Arithmetic operation resulted in an overflow.
   at System.IntPtr.ToInt32()
   at Avalonia.X11.Screens.X11Screens.X11Screen.UpdateWorkArea()
   at Avalonia.X11.Screens.X11Screens.X11Screen.Refresh(MonitorInfo newInfo)
   at Avalonia.X11.Screens.X11Screens.ScreenChanged(X11Screen screen)
   at Avalonia.Platform.ScreensBase`2.ScreenAdded(TScreen screen)
   at Avalonia.Platform.ScreensBase`2.EnsureScreens()
   at Avalonia.Platform.ScreensBase`2.get_AllScreens()
   at Avalonia.X11.X11Window..ctor(AvaloniaX11Platform platform, IWindowImpl popupParent, X11WindowMode mode, Boolean overrideRedirect)
   at Avalonia.X11.X11Window..ctor(AvaloniaX11Platform platform, IWindowImpl popupParent, Boolean overrideRedirect)
   at Avalonia.X11.AvaloniaX11Platform.CreateWindow()
   at Avalonia.Controls.Platform.PlatformManager.CreateWindow()
   at Avalonia.Controls.Window..ctor()
   at FluentAvalonia.UI.Windowing.AppWindow..ctor()
   at StabilityMatrix.Avalonia.Controls.AppWindowBase..ctor() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Controls/AppWindowBase.cs:line 18
   at StabilityMatrix.Avalonia.Views.FirstLaunchSetupWindow..ctor() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Views/FirstLaunchSetupWindow.axaml.cs:line 15
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at StabilityMatrix.Avalonia.App.OnFrameworkInitializationCompleted() in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/App.axaml.cs:line 182
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action`1 lifetimeBuilder)
   at StabilityMatrix.Avalonia.Program.Main(String[] args) in /build/stabilitymatrix/src/StabilityMatrix/StabilityMatrix.Avalonia/Program.cs:line 150
Aborted                    sh -c 'cd /opt/stabilitymatrix && export APPIMAGE=/opt/stabilitymatrix/StabilityMatrix.Avalonia && /opt/stabilitymatrix/StabilityMatrix.Avalonia'

I have no idea whether I'm even trying to launch Stability Matrix correctly, nor do I have any idea where to begin figuring out what is going wrong here.

Steps to reproduce

Just enter "sh -c 'cd /opt/stabilitymatrix && export APPIMAGE=/opt/stabilitymatrix/StabilityMatrix.Avalonia && /opt/stabilitymatrix/StabilityMatrix.Avalonia'" on the command line (or just "/opt/stabilitymatrix/StabilityMatrix.Avalonia", but then it additionally fails because it claims it cannot find the appimage environment variable).

Relevant logs


Version

2.15.7

What Operating System are you using?

Linux

frankspace avatar Apr 12 '26 22:04 frankspace

Have you used any previous versions? If so, did this problem start with 2.15.7?

SRStwo avatar Apr 13 '26 02:04 SRStwo

No, I've never used it before. To be honest, it isn't even entirely clear to me how I use it. I just tried to execute the only executable I could find.

frankspace avatar Apr 13 '26 02:04 frankspace

Are you in X11 or Wayland?

What desktop environment or window manager/compositor are you using?

Are you using multiple displays? If so can you post the output of xrandr --verbose (if in x11)

If using multiple displays, try changing temporarily to a simple single display output and see if it still happens.

What's happening is from the Avalonia backend of StabilityMatrix when it tries to enumerate your display and workspace, a 64bit value is being pushed into a 32bit integer causing it to overflow and crashing avalonia when it tries to process the display workspace available

NeuralFault avatar Apr 14 '26 15:04 NeuralFault

This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.

github-actions[bot] avatar Jun 14 '26 02:06 github-actions[bot]

This issue was closed because it has been stale for 7 days with no activity.

github-actions[bot] avatar Jun 21 '26 02:06 github-actions[bot]