Unhandled Exception crash on launch.
Innomen opened this issue · comments
Requirements
- This issue doesn't already exist
- This bug is Not related to compatability with a specific game
Summary
Windows 11 Pro.
Contents of crash log:
- Process with an Id of 1324 is not running. � ArgumentExceptionõ� at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at BorderlessGaming.Logic.Windows.Native.QueryProcessesWithWindows(Action1 callback, List
1 windowPtrSet) in C:\borderless-gaming\BorderlessGaming\Logic\Windows\Native.cs:line 443
at BorderlessGaming.Logic.Core.ProcessWatcher.UpdateProcesses() in C:\borderless-gaming\BorderlessGaming\Logic\Core\ProcessWatcher.cs:line 204
at BorderlessGaming.Logic.Core.ProcessWatcher.Watch() in C:\borderless-gaming\BorderlessGaming\Logic\Core\ProcessWatcher.cs:line 59
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Steps to reproduce
- Launch.
Technical details
Windows 11 pro.
AMD Ryzen 7 5700U ("APU"(Combo/integrated))
version
10
Same thing for me, on Win 10 I get the following process ID:
14740
Same thing on windows 11 pro 22H2
Same here on Windows 10, both on the stable and on the beta. Interestingly, the PID is stable between crash logs (14832 in my case, doubt it matters). I checked (tasklist /fi "pid eq 14832"
) and indeed there's no such process. Deleting the config (%APPDATA%/borderless-gaming/config.bopbin
) does not make the PID change; I'm really curious where it's coming from.
Either way, this means we're not looking at a race condition with rapidly spawning / quitting processes, but instead QueryProcessesWithWindows
consistently gets a process that doesn't exist.
... also: this is the same as #635, #473, and #596. I'm not fluent in Windows programming, can't find where the process list is getting populated. #596 says rebooting fixed their issue, which kinda hints that either
- there's a per-boot cache inside Borderless Gaming (that I also can't find), or
- some Windows API somewhere is returning a defunct PID (? maybe? I'm kinda in the dark here)
I'm also getting an Unhandled Exception crash on launch.
Crash seems to happen immediately after the list of windows/games is populated.
Windows 11 Pro 64-bit (10.0, Build 22621)
+Process with an Id of 24168 is not running.��ArgumentException�¯� at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)
at System.Diagnostics.Process.GetProcessById(Int32 processId)
at BorderlessGaming.Logic.Windows.Native.QueryProcessesWithWindows(Action`1 callback, List`1 windowPtrSet) in E:\Downloads\Borderless-Gaming-master (3)\Borderless-Gaming-master\BorderlessGaming.Logic\Windows\Native.cs:line 442
at BorderlessGaming.Logic.Core.ProcessWatcher.<UpdateProcesses>d__20.MoveNext() in E:\Downloads\Borderless-Gaming-master (3)\Borderless-Gaming-master\BorderlessGaming.Logic\Core\ProcessWatcher.cs:line 206
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at BorderlessGaming.Logic.Core.ProcessWatcher.<Watch>d__15.MoveNext() in E:\Downloads\Borderless-Gaming-master (3)\Borderless-Gaming-master\BorderlessGaming.Logic\Core\ProcessWatcher.cs:line 61
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()