Skip to content

Application crash on RDP reconnect while connecting #2987

@RafalNiewinski

Description

@RafalNiewinski

Describe your issue:
The app crashes if I click reconnect for RDP connection while this connection is already in connecting state.
It happens when we have for example slow Internet connection or host is unavailable and connection just waiting to be timed out.

Steps to reproduce the issue:

  1. Open RDP connection for non existing server (random IP);
  2. (While waiting for connection to be established or timed out);
  3. Right-click on opened tab and select Reconnect.

NETworkManager version:
2024.12.31.0

  • Portable

Windows version (like 10.0.x.x):
Windows 10 22H2

.NET version (like 6.0.x):
8.0.11

Screenshots

Image

NETworkManager.log 2025-01-16 08:08:44,594 [1] FATAL NETworkManager.App - Unhandled exception occured!

2025-01-16 08:08:44,622 [1] FATAL NETworkManager.App - Exception raised by: System.Runtime.InteropServices.COMException (0x80004005):
Error HRESULT E_FAIL has been returned from a call to a COM component.
at MSTSCLib.IMsRdpClient10.set_DesktopWidth(Int32 pVal)
at AxMSTSCLib.AxMsRdpClient10NotSafeForScripting.set_DesktopWidth(Int32 value)
at NETworkManager.Controls.RemoteDesktopControl.Reconnect()
at NETworkManager.Controls.RemoteDesktopControl.ReconnectAction()
at NETworkManager.Controls.RemoteDesktopControl.<get_ReconnectCommand>b__29_0(Object _)
at NETworkManager.Utilities.RelayCommand.Execute(Object parameter)
at NETworkManager.ViewModels.RemoteDesktopHostViewModel.ReconnectAction(Object view)
at NETworkManager.Utilities.RelayCommand.Execute(Object parameter)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, DelegatecatchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions