Only works for the first 5 minutes after launch
This program freezes after 5 minutes and goes into an unclickable window that has to be closed through the task manager. It turns out that it only works for the first 5 minutes after launch. I bought it on steam at the release, hoping that there would be fewer errors, but they still haunt me. This program runs as administrator every time I start my computer and should run all the time until I launch one of my pre-configured games. As soon as this does not happen, I check the program and each time I notice that the window does not respond to clicks, and the tray icon brings up a menu, but it also cannot be clicked. Accordingly, the window does not stretch to full screen, and the procedure for restarting it turns into finding the BorderlessGaming.exe process and starting it again so that everything works as expected, but only for the first time until the next error. Or rather, there is no error, the window simply dies and becomes inactive, it does not stretch the game and that's it. Finally, do something about it.

I can also reproduce
There is no discernable trigger to this, turning off automatic processing doesn't help, hiding processes that wont ever be maximised doesn't help. The only fix is to kill BG then restart it.
I've had this issue persist from retail Win10 x64 through to Win11 Fast Insider x64
I've been having a similar issue. I've started debugging it, and managed to trigger it under debug mode. It appears to be triggered when a process exits.
ProcessDetails.WindowHandle.get() is stuck waiting for a result from GetMainWindowForProcess on line 58 that never happens.
I suspect it is racing with ProcessHasExited. The process hasn't quite exited yet, but by the time it tries to get the window handle (to get the window title) the process is gone.
Here's the stack I caught.
[Managed to Native Transition]
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout, bool exitContext) Unknown
mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout) Unknown
mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task) Unknown
mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter<System.IntPtr>.GetResult() Unknown
BorderlessGaming.Logic.dll!BorderlessGaming.Logic.Models.ProcessDetails.WindowHandle.get() Line 58 C#
> BorderlessGaming.Logic.dll!BorderlessGaming.Logic.Models.ProcessDetails.ProcessDetails(System.Diagnostics.Process p, System.IntPtr hWnd) Line 32 C#
BorderlessGaming.Logic.dll!BorderlessGaming.Logic.Windows.ForegroundManager.WinEventProc(System.IntPtr hWinEventHook, uint eventType, System.IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime) Line 35 C#
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm) Unknown
BorderlessGaming.exe!BorderlessGaming.Program.Main() Line 31 C#
I'm guessing this is related to "Slow Window Detection", also mentioned here https://github.com/Codeusa/Borderless-Gaming/issues/577
This will be fixed in 10.0
Rejoice! I cannot wait
On Sat, 17 Jun 2023, 00:41 andrew, @.***> wrote:
This will be fixed in 10.0
— Reply to this email directly, view it on GitHub https://github.com/Codeusa/Borderless-Gaming/issues/574#issuecomment-1595486266, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSAYSYPBHCRWLW7QT4CKU3XLTVI5ANCNFSM55ETM4IA . You are receiving this because you commented.Message ID: @.***>
@andrewmd5 can't help but notice you've closed a bunch of issues related to this problem. Even on 10.0.0 I was still having the issues. If there is no pull request or commit made to fix this issue I will make a new issue. This bug isn't completed
This issue was resolved in the latest preview release.
Sent via Superhuman iOS ( @.*** )
On Wed, Feb 21 2024 at 5:46 AM, George Humphreys < @.*** > wrote:
@andrewmd5 ( https://github.com/andrewmd5 ) can't help but notice you've closed a bunch of issues related to this problem. Even on 10.0.0 I was still having the issues. If there is no pull request or commit made to fix this issue I will make a new issue. This bug isn't completed
— Reply to this email directly, view it on GitHub ( https://github.com/Codeusa/Borderless-Gaming/issues/574#issuecomment-1955051924 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAJ4VNOQZ26NMZJ5L46ENB3YUUDRZAVCNFSM55ETM4IKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGUYDKMJZGI2A ). You are receiving this because you were mentioned. Message ID: <Codeusa/Borderless-Gaming/issues/574/1955051924 @ github. com>