Borderless-Gaming icon indicating copy to clipboard operation
Borderless-Gaming copied to clipboard

Only works for the first 5 minutes after launch

Open Wrascon opened this issue 3 years ago • 1 comments

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. image image

Wrascon avatar Jul 31 '22 09:07 Wrascon

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

Thepenguin9 avatar Aug 04 '22 14:08 Thepenguin9

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#

Saturn49 avatar Jan 12 '23 06:01 Saturn49

I'm guessing this is related to "Slow Window Detection", also mentioned here https://github.com/Codeusa/Borderless-Gaming/issues/577

Saturn49 avatar Jan 12 '23 06:01 Saturn49

This will be fixed in 10.0

andrewmd5 avatar Jun 16 '23 23:06 andrewmd5

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: @.***>

Thepenguin9 avatar Jun 17 '23 00:06 Thepenguin9

@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

Thepenguin9 avatar Feb 20 '24 20:02 Thepenguin9

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>

andrewmd5 avatar Feb 20 '24 20:02 andrewmd5