furesoft / Slithin

A management application for the remarkable tablet
GNU General Public License v3.0
152 stars 8 forks source link

[Bug] Crash when pressing connect with no info #230

Closed ElDavoo closed 2 years ago

ElDavoo commented 2 years ago

Describe the bug When you press "connect" without saved devices or infos (ip address and password), the program will load for many seconds and then crash.

To Reproduce Steps to reproduce the behavior:

  1. Install app
  2. Click connect

Expected behavior I expected basic form validation (a message like "ip is empty, password is empty")

Desktop (please complete the following information):

ElDavoo commented 2 years ago

Tried with 1.0.16.0

 ---> System.Net.Sockets.SocketException (10022): Argomento fornito non valido.
   --- End of inner exception stack trace ---
   at System.Net.IPAddressParser.Parse(ReadOnlySpan`1 ipSpan, Boolean tryParse)
   at System.Net.IPAddress.Parse(String ipString)
   at Slithin.ViewModels.ConnectionWindowViewModel.Connect(Object obj) in /home/runner/work/Slithin/Slithin/Source/Slithin/ViewModels/ConnectWindowViewModel.cs:line 106
   at Slithin.Core.MVVM.DelegateCommand.Execute(Object parameter) in /home/runner/work/Slithin/Slithin/Source/Libraries/Slithin.Core/MVVM/DelegateCommand.cs:line 32
   at Avalonia.Controls.Button.OnClick() in /_/src/Avalonia.Controls/Button.cs:line 314
   at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e) in /_/src/Avalonia.Controls/Button.cs:line 357
   at Avalonia.Input.InputElement.<>c.<.cctor>b__32_9(InputElement x, PointerReleasedEventArgs e) in /_/src/Avalonia.Input/InputElement.cs:line 223
   at System.Reactive.Subjects.Subject`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 145
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 118
   at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 79
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 123
   at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers) in /_/src/Avalonia.Input/MouseDevice.cs:line 311
   at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 153   at Avalonia.Input.MouseDevice.ProcessRawEvent(RawInputEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 90
   at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 34
   at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e) in /_/src/Avalonia.Controls/TopLevel.cs:line 504
   at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:line 541
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/WindowImpl.WndProc.cs:line 33
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 205
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
   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 Slithin.Program.Main(String[] args) in /home/runner/work/Slithin/Slithin/Source/Slithin/Program.cs:line 21
furesoft commented 2 years ago

What did you enter to login?

ElDavoo commented 2 years ago

nothing

furesoft commented 2 years ago

hmm. I have tested it without an exception. Did you do anything special?

ElDavoo commented 2 years ago

image In Windows Sandbox, this appears on version 1.0.18.0 (minor layout problem)

ElDavoo commented 2 years ago

hmm. I have tested it without an exception. Did you do anything special?

No, but the error is fixed (even though the text layout is wrong)