icsharpcode / AvaloniaILSpy

Avalonia-based .NET Decompiler (port of ILSpy)
1.55k stars 173 forks source link

Crash when clicking on opening #60

Closed pac85 closed 3 years ago

pac85 commented 3 years ago

The distro I'm using is Arch Linux Reverting d15808912fd80df4f57f4f72256a1083fb05ec9a fixes it for me. Log is

Tmds.DBus.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files
   at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
   at Tmds.DBus.Connection.CallMethodAsync(Message message)
   at Tmds.DBus.CodeGen.DBusObjectProxy.SendMethodReturnReaderAsync(String iface, String member, Nullable`1 inSignature, MessageWriter writer)
   at Avalonia.FreeDesktop.DBusMenuExporter.DBusMenuExporterImpl.Init() in /_/src/Avalonia.FreeDesktop/DBusMenuExporter.cs:line 59
Tmds.DBus.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files
   at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
   at Tmds.DBus.Connection.CallMethodAsync(Message message)
   at Tmds.DBus.CodeGen.DBusObjectProxy.SendMethodReturnReaderAsync(String iface, String member, Nullable`1 inSignature, MessageWriter writer)
   at Avalonia.FreeDesktop.DBusMenuExporter.DBusMenuExporterImpl.Init() in /_/src/Avalonia.FreeDesktop/DBusMenuExporter.cs:line 59
Tmds.DBus.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.AppMenu.Registrar was not provided by any .service files
   at Tmds.DBus.DBusConnection.CallMethodAsync(Message msg, Boolean checkConnected, Boolean checkReplyType)
   at Tmds.DBus.Connection.CallMethodAsync(Message message)
   at Tmds.DBus.CodeGen.DBusObjectProxy.SendMethodReturnReaderAsync(String iface, String member, Nullable`1 inSignature, MessageWriter writer)
   at Avalonia.FreeDesktop.DBusMenuExporter.DBusMenuExporterImpl.Init() in /_/src/Avalonia.FreeDesktop/DBusMenuExporter.cs:line 59
Sorry, we crashed
System.ArgumentNullException: String reference not set to an instance of a String. (Parameter 's')
   at System.Text.Encoding.GetBytes(String s)
   at Avalonia.X11.X11Window.SetTitle(String title) in /_/src/Avalonia.X11/X11Window.cs:line 1002
   at Avalonia.Controls.Window.<>c.<.cctor>b__26_0(Window s, AvaloniaPropertyChangedEventArgs e) in /_/src/Avalonia.Controls/Window.cs:line 199
   at Avalonia.AvaloniaObjectExtensions.<>c__DisplayClass23_0`1.<AddClassHandler>b__0(AvaloniaPropertyChangedEventArgs e) in /_/src/Avalonia.Base/AvaloniaObjectExtensions.cs:line 585
   at System.Reactive.Subjects.Subject`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 147
   at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaPropertyChangedEventArgs`1 change) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 720
   at Avalonia.AvaloniaObject.Avalonia.PropertyStore.IValueSink.ValueChanged[T](AvaloniaPropertyChangedEventArgs`1 change) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 493
   at Avalonia.ValueStore.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 103
   at Avalonia.AvaloniaObject.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 352
   at Avalonia.Controls.Window.set_Title(String value) in /_/src/Avalonia.Controls/Window.cs:line 276
   at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.Show(SystemDialog d, Window parent, ManagedFileDialogOptions options) in /_/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs:line 17
   at Avalonia.Dialogs.ManagedFileDialogExtensions.ManagedSystemDialogImpl`1.ShowFileDialogAsync(FileDialog dialog, Window parent) in /_/src/Avalonia.Dialogs/ManagedFileDialogExtensions.cs:line 42
   at ICSharpCode.ILSpy.MainWindow.OpenCommandExecuted(Object sender, ExecutedRoutedEventArgs e) in /mnt/void/home/archdata/cose/AvaloniaILSpy/ILSpy.Core/MainWindow.xaml.cs:line 1105
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0() in /_/src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken)
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 62
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 108
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 134
   at ICSharpCode.ILSpy.Program.Main(String[] args) in /mnt/void/home/archdata/cose/AvaloniaILSpy/ILSpy/Program.cs:line 22
jeffreye commented 3 years ago

look like something wrong with Avalonia. could you repost your issue on https://github.com/AvaloniaUI/Avalonia

Washi1337 commented 3 years ago

Seems to be related to AvaloniaUI/Avalonia#5570. Setting the Title property of the dialog before calling ShowAsync makes it work again on my end.

e.g. in MainWindow.xaml.cs:

OpenFileDialog dlg = new OpenFileDialog();
dlg.Title = "Open assembly or package";
/* ... */
var filenames = await dlg.ShowAsync(this);
GitAntoinee commented 3 years ago

Seems to be related to AvaloniaUI/Avalonia#5570. Setting the Title property of the dialog before calling ShowAsync makes it work again on my end.

e.g. in MainWindow.xaml.cs:

OpenFileDialog dlg = new OpenFileDialog();
dlg.Title = "Open assembly or package";
/* ... */
var filenames = await dlg.ShowAsync(this);

I can confirm this fixed the issue on my laptop (Arch Linux)