Valkirie / HandheldCompanion

ControllerService
Other
1.16k stars 91 forks source link

Cannot set Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing #1056

Open CasperH2O opened 4 months ago

CasperH2O commented 4 months ago

Device manufacturer

Device model X1+ One X GPU

Handheld Companion Version 0.21.0.0

Describe the bug

Public release 0.21 is running on my X1 But i dare not touch Profile -> Graphic Settings -> Integer Scaling cause on my X1+onexgpu [external display only], my screen goes blank and thereafter HC goes always blank when run. Resolve by deleting/reset the whole document/handheld companion/ folder. Will use AMD adrenalin setting to setup integer scaling if needed.

i cant remember, older version also similar. blank screen. it has nothing to do with software. its AMD and it does not work nice with integer scalling with EGPU and external monitor.

i just test the AMD software by turning on GPU scaling (the external screen blank for moment and turn on) then the Integer Scaling. It seems ok for my external screen. hence, AMD seems works. haven't tried game yet. Image the moment of blank screen is cause by GPU scaling cause my external monitor to change from 120hz to 60hz. all this is via onexgpu AMD 7600m XT

image

The fault is, if under the circumstance of GPU scaling = on, and Integer Scaling = on. Monitor switch to 60hz. But if i manually switch from 60hz display settings advanced to 120hz. I get blank screen. hence its amd fault. but if your software can do the same, use only 60hz. then i guess it be good.

Logs file

Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing.      at System.Windows.Window.VerifyNotClosing()
   at System.Windows.Window.Show()
   at HandheldCompanion.Views.Windows.OverlayQuickTools.<ToggleVisibility>b__45_0() in C:\Users\NUC\Documents\GitHub\HandheldCompanion-EA\HandheldCompanion\Views\Windows\OverlayQuickTools.xaml.cs:line 378
   at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke(Action callback)
   at HandheldCompanion.Views.Windows.OverlayQuickTools.ToggleVisibility() in C:\Users\NUC\Documents\GitHub\HandheldCompanion-EA\HandheldCompanion\Views\Windows\OverlayQuickTools.xaml.cs:line 372
   at HandheldCompanion.Views.Windows.OverlayQuickTools.Window_Closing(Object sender, CancelEventArgs e) in C:\Users\NUC\Documents\GitHub\HandheldCompanion-EA\HandheldCompanion\Views\Windows\OverlayQuickTools.xaml.cs:line 404
   at System.Windows.Window.WmClose()
   at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

HandheldCompanion-20240418.log