[GH-ISSUE #311] Error on full screen to maximize change #272

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

Originally created by @loverzpark on GitHub (Nov 2, 2022).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/311

Environment

Component Version
PRemoteM(Store) 0.7.1.6(Microsoft store)
.NET Framework .NET Framework 4.8
CLR 4.0.30319.42000
OS Windows 10 Pro for Workstations 64-bits 10.0.22623.0 (2009)

Error Info

Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed.

Stack Trace

   at System.Windows.Window.VerifyCanShow()
   at System.Windows.Window.Show()
   at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82
   at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314
   at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500
   at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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, Delegate catchHandler)

Recent Log

[T:001][03:19:37.019]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][03:19:37.050]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:001][03:23:01.705]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][03:23:01.708]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:001][04:27:35.655]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][04:27:35.667]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:001][23:08:34.951]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][23:08:34.962]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:001][23:08:36.283]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][23:08:36.287]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:018][23:09:01.601]	`Debug`		MarkProtocolHostToClose: marking to close: AxMsRdpClient09Host(id = 1, hash = 62218962)
[T:018][23:09:01.612]	`Info`		MarkProtocolHostToClose: Current: Host = 0, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 0
[T:001][23:09:03.161]	`Debug`		Call shortcut to invoke launcher Visibility = Hidden
[T:001][23:09:04.137]	`Debug`		SetSelfStartingHelper.SetSelfStartByStartupTask(True, "PRemoteM")
[T:043][23:09:04.179]	`Warning`		[(Execute:0)]	we don't have a protocol named: RDP
[T:001][23:09:04.215]	`Debug`		AxMsRdpClient09Host: Status => Initializing
[T:001][23:09:04.217]	`Debug`		RDP Host: _rdpClient.Dispose()
[T:001][23:09:04.219]	`Debug`		RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx()
[T:001][23:09:04.222]	`Debug`		RDP Host: init CreateControl();
[T:001][23:09:04.308]	`Debug`		RDP Host: init Static
[T:001][23:09:04.317]	`Debug`		RDP Host: init conn bar
[T:001][23:09:04.319]	`Debug`		RDP Host: init Redirect
[T:001][23:09:04.329]	`Debug`		RDP Host: init Display with ScaleFactor = 125, W = 0, H = 0
[T:001][23:09:04.338]	`Debug`		RDP Host: Display init end: RDP.DesktopWidth = 1920, RDP.DesktopHeight = 1080,
[T:001][23:09:04.339]	`Debug`		RDP Host: init Performance
[T:001][23:09:04.352]	`Debug`		RdpInit: DisplayPerformance = Auto, flag = 0
[T:001][23:09:04.369]	`Debug`		RDP Host: init Gateway
[T:001][23:09:04.371]	`Debug`		AxMsRdpClient09Host: Status => Initialized
[T:001][23:09:04.483]	`Debug`		Move host(15597466) to full(6159466)
[T:001][23:09:04.508]	`Info`		MoveProtocolHostToFullScreen: Current: Host = 1, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 1
[T:001][23:09:04.512]	`Debug`		AxMsRdpClient09Host: Status => Connecting
[T:001][23:09:04.803]	`Debug`		Start Conn: AW-AGENT007(48704899) by host(15597466) with full
[T:001][23:09:05.508]	`Debug`		RDP Host:  OnRequestGoFullScreen
[T:001][23:09:05.551]	`Debug`		RDP to FullScreen resize ParentWindow to : W = 1536, H = 864, while screen size is 1920 × 1080, ScaleFactor = 125
[T:001][23:09:05.563]	`Debug`		RDP resize to: W = 1920, H = 1080, ScaleFactor = 125
[T:001][23:09:05.570]	`Error`		[AxMsRdpClient09Host.xaml.cs(SetRdpResolution:762)]	
> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
   at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
   at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\DemoProject\PRemoteM-NET6\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 753
> StackTrace:    at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor)
   at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\DemoProject\PRemoteM-NET6\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 753
[T:001][23:09:05.677]	`Debug`		RDP Host:  RdpOnOnConnected
[T:001][23:09:05.692]	`Debug`		AxMsRdpClient09Host: Status => Connected
[T:001][23:09:05.706]	`Debug`		RDP Host: ReConn with full screen
[T:001][23:09:06.577]	`Debug`		RDP Host:  RdpOnOnLoginComplete
[T:001][23:09:10.942]	`Debug`		RDP: NotifyRedirectDeviceChange Receive(537, 7, 0)
[T:001][23:09:10.944]	`Debug`		RDP: NotifyRedirectDeviceChange(7, 0)
[T:001][23:09:15.703]	`Debug`		RDP Host:  OnRequestLeaveFullScreen
[T:001][23:09:16.043]	`Debug`		MoveProtocolHostToTab: Moving host(15597466) to any tab
[T:001][23:09:16.045]	`Debug`		Hide full(6159466)
[T:001][23:09:16.072]	`Debug`		MoveProtocolHostToTab: Moved host(15597466) to tab(17792611)
[T:001][23:09:16.091]	`Info`		MoveProtocolHostToTab: Current: Host = 1, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 1
[T:001][23:09:16.463]	`Debug`		RDP resize to: W = 582, H = 433, ScaleFactor = 125
[T:001][23:09:20.812]	`Debug`		Call shortcut to invoke launcher Visibility = Hidden
[T:001][23:09:21.738]	`Debug`		SetSelfStartingHelper.SetSelfStartByStartupTask(True, "PRemoteM")
[T:001][23:09:21.770]	`Debug`		_connectionId2Hosts ContainsKey 1
[T:001][23:09:21.788]	`Fatal`		[(TryCatchWhen:0)]	
> System.InvalidOperationException: Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed.
   at System.Windows.Window.VerifyCanShow()
   at System.Windows.Window.Show()
   at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82
   at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314
   at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500
   at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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, Delegate catchHandler)
> StackTrace:    at System.Windows.Window.VerifyCanShow()
   at System.Windows.Window.Show()
   at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82
   at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314
   at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500
   at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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, Delegate catchHandler)

Originally created by @loverzpark on GitHub (Nov 2, 2022). Original GitHub issue: https://github.com/1Remote/1Remote/issues/311 <details> ## Environment | Component | Version | |:------------------|:--------------------------------------| |PRemoteM(Store) | `0.7.1.6`(Microsoft store)| |.NET Framework | `.NET Framework 4.8` | |CLR | `4.0.30319.42000` | |OS | `Windows 10 Pro for Workstations 64-bits 10.0.22623.0 (2009)` | ## Error Info Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed. ## Stack Trace ``` at System.Windows.Window.VerifyCanShow() at System.Windows.Window.Show() at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82 at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314 at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500 at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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, Delegate catchHandler) ``` ## Recent Log ``` [T:001][03:19:37.019] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][03:19:37.050] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:001][03:23:01.705] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][03:23:01.708] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:001][04:27:35.655] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][04:27:35.667] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:001][23:08:34.951] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][23:08:34.962] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:001][23:08:36.283] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][23:08:36.287] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:018][23:09:01.601] `Debug` MarkProtocolHostToClose: marking to close: AxMsRdpClient09Host(id = 1, hash = 62218962) [T:018][23:09:01.612] `Info` MarkProtocolHostToClose: Current: Host = 0, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 0 [T:001][23:09:03.161] `Debug` Call shortcut to invoke launcher Visibility = Hidden [T:001][23:09:04.137] `Debug` SetSelfStartingHelper.SetSelfStartByStartupTask(True, "PRemoteM") [T:043][23:09:04.179] `Warning` [(Execute:0)] we don't have a protocol named: RDP [T:001][23:09:04.215] `Debug` AxMsRdpClient09Host: Status => Initializing [T:001][23:09:04.217] `Debug` RDP Host: _rdpClient.Dispose() [T:001][23:09:04.219] `Debug` RDP Host: init new AxMsRdpClient9NotSafeForScriptingEx() [T:001][23:09:04.222] `Debug` RDP Host: init CreateControl(); [T:001][23:09:04.308] `Debug` RDP Host: init Static [T:001][23:09:04.317] `Debug` RDP Host: init conn bar [T:001][23:09:04.319] `Debug` RDP Host: init Redirect [T:001][23:09:04.329] `Debug` RDP Host: init Display with ScaleFactor = 125, W = 0, H = 0 [T:001][23:09:04.338] `Debug` RDP Host: Display init end: RDP.DesktopWidth = 1920, RDP.DesktopHeight = 1080, [T:001][23:09:04.339] `Debug` RDP Host: init Performance [T:001][23:09:04.352] `Debug` RdpInit: DisplayPerformance = Auto, flag = 0 [T:001][23:09:04.369] `Debug` RDP Host: init Gateway [T:001][23:09:04.371] `Debug` AxMsRdpClient09Host: Status => Initialized [T:001][23:09:04.483] `Debug` Move host(15597466) to full(6159466) [T:001][23:09:04.508] `Info` MoveProtocolHostToFullScreen: Current: Host = 1, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 1 [T:001][23:09:04.512] `Debug` AxMsRdpClient09Host: Status => Connecting [T:001][23:09:04.803] `Debug` Start Conn: AW-AGENT007(48704899) by host(15597466) with full [T:001][23:09:05.508] `Debug` RDP Host: OnRequestGoFullScreen [T:001][23:09:05.551] `Debug` RDP to FullScreen resize ParentWindow to : W = 1536, H = 864, while screen size is 1920 × 1080, ScaleFactor = 125 [T:001][23:09:05.563] `Debug` RDP resize to: W = 1920, H = 1080, ScaleFactor = 125 [T:001][23:09:05.570] `Error` [AxMsRdpClient09Host.xaml.cs(SetRdpResolution:762)] > System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\DemoProject\PRemoteM-NET6\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 753 > StackTrace: at MSTSCLib.IMsRdpClient9.UpdateSessionDisplaySettings(UInt32 ulDesktopWidth, UInt32 ulDesktopHeight, UInt32 ulPhysicalWidth, UInt32 ulPhysicalHeight, UInt32 ulOrientation, UInt32 ulDesktopScaleFactor, UInt32 ulDeviceScaleFactor) at PRM.View.Host.ProtocolHosts.AxMsRdpClient09Host.<>c__DisplayClass49_0.<SetRdpResolution>b__0() in D:\DemoProject\PRemoteM-NET6\Ui\View\Host\ProtocolHosts\AxMsRdpClient09Host.xaml.cs:line 753 [T:001][23:09:05.677] `Debug` RDP Host: RdpOnOnConnected [T:001][23:09:05.692] `Debug` AxMsRdpClient09Host: Status => Connected [T:001][23:09:05.706] `Debug` RDP Host: ReConn with full screen [T:001][23:09:06.577] `Debug` RDP Host: RdpOnOnLoginComplete [T:001][23:09:10.942] `Debug` RDP: NotifyRedirectDeviceChange Receive(537, 7, 0) [T:001][23:09:10.944] `Debug` RDP: NotifyRedirectDeviceChange(7, 0) [T:001][23:09:15.703] `Debug` RDP Host: OnRequestLeaveFullScreen [T:001][23:09:16.043] `Debug` MoveProtocolHostToTab: Moving host(15597466) to any tab [T:001][23:09:16.045] `Debug` Hide full(6159466) [T:001][23:09:16.072] `Debug` MoveProtocolHostToTab: Moved host(15597466) to tab(17792611) [T:001][23:09:16.091] `Info` MoveProtocolHostToTab: Current: Host = 1, Full = 1, Tab = 1, HostToBeDispose = 1, WindowToBeDispose = 1 [T:001][23:09:16.463] `Debug` RDP resize to: W = 582, H = 433, ScaleFactor = 125 [T:001][23:09:20.812] `Debug` Call shortcut to invoke launcher Visibility = Hidden [T:001][23:09:21.738] `Debug` SetSelfStartingHelper.SetSelfStartByStartupTask(True, "PRemoteM") [T:001][23:09:21.770] `Debug` _connectionId2Hosts ContainsKey 1 [T:001][23:09:21.788] `Fatal` [(TryCatchWhen:0)] > System.InvalidOperationException: Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed. at System.Windows.Window.VerifyCanShow() at System.Windows.Window.Show() at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82 at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314 at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500 at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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, Delegate catchHandler) > StackTrace: at System.Windows.Window.VerifyCanShow() at System.Windows.Window.Show() at PRM.Service.SessionControlService.ActivateOrReConnIfServerSessionIsOpened(ProtocolBase server) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 82 at PRM.Service.SessionControlService.ShowRemoteHost(Int64 serverId, String assignTabToken, String assignRunnerName) in D:\DemoProject\PRemoteM-NET6\Ui\Service\SessionControlService.cs:line 314 at PRM.View.LauncherWindowViewModel.OpenSessionAndHide() in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowViewModel.cs:line 500 at PRM.View.LauncherWindowView.TbKeyWord_OnPreviewKeyDown(Object sender, KeyEventArgs e) in D:\DemoProject\PRemoteM-NET6\Ui\View\LauncherWindowView.xaml.cs:line 142 at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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, Delegate catchHandler) ``` </details>
kerem 2026-02-26 11:57:31 +03:00
  • closed this issue
  • added the
    bug
    label
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#272
No description provided.