ZeroFox5866/nucleuscoop

When Window Title is unspecified, all process are found when attempting to find by window title.

Epsicle opened this issue · 0 comments

Latching on to incorrect processes

It appears that if a process is killed very quickly after Nucleus starts it, Nucleus will attempt to find it by the window's title. But if like in the WIP handler that caused this crash no title is specified, it seems to incorrectly latch on to every instance as seen below.

[2023-11-11 15:50:08]HANDLER: ********** Setting up player 2 **********
[2023-11-11 15:50:09]HANDLER: Injecting hook DLL for previous instance
[2023-11-11 15:50:10]HANDLER: Injecting hooks DLL
[2023-11-11 15:50:10]HANDLER: Player monitor's resolution: 1920x1080
[2023-11-11 15:50:10]HANDLER: Starting Goldberg setup
[2023-11-11 15:50:10]HANDLER: Found c:\users\gaming\documents\phasmophobia\Phasmophobia_Data\Plugins\x86_64\steam_api64.dll
[2023-11-11 15:50:10]HANDLER: New steam api folder found
[2023-11-11 15:50:10]HANDLER: Generating account_name.txt with nickname Frankie
[2023-11-11 15:50:10]HANDLER: Generating user_steam_id.txt with user steam ID 76561199023125439
[2023-11-11 15:50:10]HANDLER: Found c:\users\gaming\documents\phasmophobia\Phasmophobia_Data\Plugins\x86_64\steam_api64_NUCLEUS_BACKUP.dll
[2023-11-11 15:50:10]HANDLER: Goldberg setup complete
[2023-11-11 15:50:10]HANDLER: Writing ncoop.ini to c:\users\gaming\documents\phasmophobia with Game.Hook values
[2023-11-11 15:50:10]HANDLER: Enabling MKB
[2023-11-11 15:50:10]HANDLER: Custom DLL setup complete
[2023-11-11 15:50:10]HANDLER: Launching game directly at C:\Users\Gaming\Documents\Phasmophobia\Phasmophobia.exe with args  -screen-fullscreen 0 -popupwindow  -screen-width 1920 -screen-height 540
[2023-11-11 15:50:10]HANDLER: Obtained process Phasmophobia (pid 12484)
[2023-11-11 15:50:10]HANDLER: Process details; Name: Phasmophobia, ID: 12484, MainWindowtitle: , NucleusGetMainWindowHandle(): 0
[2023-11-11 15:50:10]HANDLER: Setting process data to process Phasmophobia (pid 12484)
[2023-11-11 15:50:10]HANDLER: Pausing for 60 seconds
[2023-11-11 15:51:10]HANDLER: Process is no longer running. Attempting to find process by window title
[2023-11-11 15:51:10]HANDLER: Process found, SecurityHealthService pid (11632)
[2023-11-11 15:51:10]HANDLER: Recreating player process data
[2023-11-11 15:51:10]HANDLER: Process details; Name: SecurityHealthService, ID: 11632, MainWindowtitle: , NucleusGetMainWindowHandle(): 0
[2023-11-11 15:51:10]HANDLER: Process found, sihost pid (8180)
[2023-11-11 15:51:10]HANDLER: Recreating player process data
[2023-11-11 15:51:10]HANDLER: Process details; Name: sihost, ID: 8180, MainWindowtitle: , NucleusGetMainWindowHandle(): 0

Killing all processes

If the user hits "stop" in the Nucleus GUI after this has happened, Nucleus will then kill every single process it latched on to. Which in my case included Chrome, Explorer, and several other Windows System processes. My computer did not crash, but did require a reboot to restore all the affected applications to their proper state. I've included a small snippet below.

[2023-11-11 15:51:18]HANDLER: Killing process svchost (pid 2316)
[2023-11-11 15:51:18]HANDLER:  Access is denied
[2023-11-11 15:51:18]HANDLER: Killing process cdarbsvc_v1.2.0_x64 (pid 4504)
[2023-11-11 15:51:18]HANDLER:  Access is denied
[2023-11-11 15:51:18]HANDLER: Killing process SearchIndexer (pid 7052)
[2023-11-11 15:51:18]HANDLER:  Access is denied
[2023-11-11 15:51:18]HANDLER: Killing process chrome (pid 13492)
[2023-11-11 15:51:18]HANDLER: Killing process XBoxStat (pid 10288)
[2023-11-11 15:51:18]HANDLER: Killing process chrome (pid 2864)
[2023-11-11 15:51:18]HANDLER: Killing process svchost (pid 2304)

This is likely a very rare edge case, but since it has the potential to corrupt aspects of a user's computer depending on what is being done at the time of the crash, it seemed important to report.

Phasmo Crash Log.txt