[GH-ISSUE #451] Catastrophic failure when running RDP connection #367

Closed
opened 2026-02-26 11:57:58 +03:00 by kerem · 4 comments
Owner

Originally created by @majkinetor on GitHub (Jul 12, 2023).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/451

Originally assigned to: @VShawn on GitHub.

[T:001][09:01:03.939] Warning [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter

[T:001][09:01:04.251] Warning [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter

[T:001][09:01:04.671] Warning [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter

[T:001][15:07:48.705] Error [AxMsRdpClient09Host.xaml.cs(b__0:823)]

System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (0x8000FFFF (E_UNEXPECTED))
at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at _1RM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass51_0.b__0() in D:\a\1Remote\1Remote\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 823

StackTrace: at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
at _1RM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass51_0.b__0() in D:\a\1Remote\1Remote\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 823

Originally created by @majkinetor on GitHub (Jul 12, 2023). Original GitHub issue: https://github.com/1Remote/1Remote/issues/451 Originally assigned to: @VShawn on GitHub. [T:001][09:01:03.939] `Warning` [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter [T:001][09:01:04.251] `Warning` [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter [T:001][09:01:04.671] `Warning` [ServerSelectionsViewModel.cs(<set_Filter>b__0:71)] CalcVisibleByFilter [T:001][15:07:48.705] `Error` [AxMsRdpClient09Host.xaml.cs(<SetRdpResolution>b__0:823)] > System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (0x8000FFFF (E_UNEXPECTED)) at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at _1RM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass51_0.<SetRdpResolution>b__0() in D:\a\1Remote\1Remote\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 823 > StackTrace: at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at AxMSTSCLib.AxMsRdpClient9NotSafeForScripting.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at _1RM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass51_0.<SetRdpResolution>b__0() in D:\a\1Remote\1Remote\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 823
kerem 2026-02-26 11:57:58 +03:00
Author
Owner

@VShawn commented on GitHub (Jul 13, 2023):

App crashed?

I do place a try...catch there.

github.com/1Remote/1Remote@bceb2928f1/Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs (L812-L830)

If this code is called before RDP desktop is displayed, the error will occur. Unfortunately, Microsoft does not provide an interface to detect if the RDP desktop login has displayed. I know there is an "OnLoginComplete" callback, but it has been tested and found that it does not trigger after the RDP desktop is displayed.

In order to set resolution successfully, I called SetRdpResolution times. It is normal for one of the calls to fail, so if the app doesn't crash, let's just ignore this issue.

<!-- gh-comment-id:1633385696 --> @VShawn commented on GitHub (Jul 13, 2023): App crashed? I do place a `try...catch` there. https://github.com/1Remote/1Remote/blob/bceb2928f1fac9afdef16f1ad9c9c7d78c379202/Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs#L812-L830 If this code is called before RDP desktop is displayed, the error will occur. Unfortunately, Microsoft does not provide an interface to detect if the RDP desktop login has displayed. I know there is an "OnLoginComplete" callback, but it has been tested and found that it does not trigger after the RDP desktop is displayed. In order to set resolution successfully, I called `SetRdpResolution` times. It is normal for one of the calls to fail, so if the app doesn't crash, let's just ignore this issue.
Author
Owner

@majkinetor commented on GitHub (Jul 13, 2023):

Yes it crashed.

As far as I can say, there was logon screen active remotelly when it crashed, and after I restarted 1RM and the connection, it displayed the desktop immediatelly.

<!-- gh-comment-id:1633654096 --> @majkinetor commented on GitHub (Jul 13, 2023): Yes it crashed. As far as I can say, there was logon screen active remotelly when it crashed, and after I restarted 1RM and the connection, it displayed the desktop immediatelly.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 5, 2023):

This issue is stale because it has been open for 30 days with no activity.

<!-- gh-comment-id:1793604397 --> @github-actions[bot] commented on GitHub (Nov 5, 2023): This issue is stale because it has been open for 30 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 19, 2023):

This issue was closed because it has been inactive for 14 days since being marked as stale.

<!-- gh-comment-id:1817714627 --> @github-actions[bot] commented on GitHub (Nov 19, 2023): This issue was closed because it has been inactive for 14 days since being marked as stale.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#367
No description provided.