nefarius / Legacinator

The one and only Legacinator
https://discord.nefarius.at
BSD 3-Clause "New" or "Revised" License
181 stars 3 forks source link

Legacinator hangs indefinitely with "window has stopped responding", cannot be killed with Task Manager, prevents reboot etc #27

Closed nexus665 closed 1 year ago

nexus665 commented 1 year ago

Hi,

lots of thanks for your pretty awesome projects, I've been using DS4Windows/ViGemBus for a long while happily. However, when I try to either manually download a ViGemBus update from Github or run your updater, I run into trouble.

Bug description

1) manual download for ViGemBus - the update downloads corrupted, gives me a cryptic error on launch, Antivirus does not log it or care, but it seems similar to issues when suspicious software is detected and blocked. 2) auto update with Legacinator - it started, splash screen displays, then window stays black and app hangs indefinitely, have let it run for about an hour without updates on a newly built very zippy Ryzen 5 7600X system with 32GB of RAM and a nice fast PCIe SSD.

Steps to reproduce

Machine info

CPU-Architecture: x64 Windows version: Windows 11 22H2 Software/driver version(s): ViGemBus 1.2.98 -> 1.2.128

nefarius commented 1 year ago

Does it generate the Legacinator.log file? If so, post it here please.

The PC specs are fine ofc., sounds more like an infinite hang on some detection logic.

nexus665 commented 1 year ago

Hiya, thanks for the quick answer! I have attached the - short but sweet - log to this post.

Also forgot to add, Legacinator is unkillable via Win11 onboard means - task refuses to die no matter what. It also prevents a successful reboot, will just forever spin its wheels while saying please wait for reboot. Had to use the reset button to gently persuade it to... Legacinator.log

nefarius commented 1 year ago

This is the path it should end up in btw.

image

nefarius commented 1 year ago

Hiya, thanks for the quick answer! I have attached the - short but sweet - log to this post.

Also forgot to add, Legacinator is unkillable via Win11 onboard means - task refuses to die no matter what. It also prevents a successful reboot, will just forever spin its wheels while saying please wait for reboot. Had to use the reset button to gently persuade it to... Legacinator.log

Oh dear, so it made the self-update check successfully, then it is silent... Hm, I can prepare and give you a version with more logging.

nexus665 commented 1 year ago

That would be great - I'll try and give it a go and upload the log.

nefarius commented 1 year ago

Here you go: Legacinator.zip

nexus665 commented 1 year ago

Interesting...this version runs fine, but finds no software to update - though new ViGemBus refused to install as mentioned in first post and I am still using 1.2.98. However, I have since manually edited the updater ini files, so maybe that was all that was required? Well, no matter, I can game Elden Ring fine as is (weiter süchteln I am - also? - from Austria ;)) Legacinator.log

nexus665 commented 1 year ago

Erm...that was the HidHide version, actually - you probably noticed anyway...

nefarius commented 1 year ago

If you ran it once, then it is fine so the updater popup will not come anymore, so despite the weirdness you experienced all looks good.

Zeit für Gaming? Der hats gut... ;P

nefarius commented 1 year ago

Let's call this one resolved 😅

noorus commented 1 year ago

Happened here too. The splash screen for Legacinator hangs and process is unkillable; it was launched via the update warning popup (from ds4windows, I presume). The only lines in a Legacinator.log that I found are

2023-09-15 15:37:43.955 +03:00 [INF] Checking for updates, preparing web request
2023-09-15 15:37:44.429 +03:00 [DBG] Latest tag name: v1.7.0

It seems to have to downloaded ViGEmBus_Updater.[dat|exe|ini] . I don't know if anything has completed successfully; I terminated ds4windows.exe and the update launcher host exe, but Legacinator.exe is a zombie.

noorus commented 1 year ago

Can't attach a debugger either. But minidump/full dump creation seemed successful from Process Explorer, if you're interested. Probably don't wanna post that publically though. Anyway thank you for all your work @nefarius

nefarius commented 1 year ago

It seems to have to downloaded ViGEmBus_Updater.[dat|exe|ini]

That is not what it does at all, no.

Sadly that older log doesn't capture enough to be helpful, can you try the latest version from here pls.

noorus commented 1 year ago

Ah, you're right, those ViGEmBus files have a date 5 hours earlier. They're just in the same temp folder so I made an assumption. I can try the new version after I get rid of the previous one somehow, I'm not in a position to reboot right now... Would you like the minidump sent somewhere?

nefarius commented 1 year ago

Sure, I mean if it is not a kernel memory dump it is safe to share here too, there is no personal information in that process memory.

nefarius commented 1 year ago

Except maybe machine and user name, I consider that not really critical info unless you named your PC after your main password 🤣

noorus commented 1 year ago

Yeah, you're right, seems fine. Here: https://www.dropbox.com/scl/fi/dnmja4gwtfg9hzz95ntqr/Legacinator.dmp?rlkey=pmut7ify8xjhvy2h840b4dd99&dl=1

nefarius commented 1 year ago

Nice, that capture it. Interesting, we're hanging indefinitely on attempting to refresh phantom devices, but why 🤔

0:000> kc
 # Call Site
00 ntdll!NtDeviceIoControlFile
01 KERNELBASE!DeviceIoControl
02 kernel32!DeviceIoControlImplementation
03 cfgmgr32!Local_CM_Reenumerate_DevNode
04 cfgmgr32!CM_Reenumerate_DevNode
05 cfgmgr32!CM_Reenumerate_DevNode_Ex
...
nefarius commented 1 year ago

That also explains why the reboot hangs; there is an IOCTL request not getting completed and that API call just gets stuck for some reason, how odd.

noorus commented 1 year ago

It is pretty weird yeah, I don't have any problematic devices/drivers in general. If you have an avenue you'd like to investigate by me running something or so, I'm open to it.

nefarius commented 1 year ago

I'll think of a workaround and give you a version to test.

nefarius commented 1 year ago

@noorus please try this build: Legacinator.zip

noorus commented 1 year ago

@noorus please try this build: Legacinator.zip

Alright, seemed to run totally fine. It took me to the update page on github but I ignored that. I think it updated the ViGEmBus driver, at least I had no other problem components listed (and shouldn't have, indeed). Log:

2023-09-16 02:53:54.257 +03:00 [WRN] Config file Legacinator.ini not found or not readable
2023-09-16 02:53:54.480 +03:00 [INF] Running with parent process: System.Diagnostics.Process (explorer)
2023-09-16 02:53:54.488 +03:00 [INF] Checking for updates, preparing web request
2023-09-16 02:53:54.853 +03:00 [DBG] Latest tag name: v1.10.3
2023-09-16 02:54:01.283 +03:00 [INF] Starting complete scan
2023-09-16 02:54:01.652 +03:00 [INF] Starting refresh of all component detection
2023-09-16 02:54:01.654 +03:00 [INF] Refreshing phantom devices
2023-09-16 02:54:01.850 +03:00 [INF] Phantom device refreshing done
2023-09-16 02:54:01.858 +03:00 [INF] Running HidGuardian detection
2023-09-16 02:54:01.879 +03:00 [INF] Done
2023-09-16 02:54:01.880 +03:00 [INF] Running SCP detection
2023-09-16 02:54:01.881 +03:00 [INF] Done
2023-09-16 02:54:01.883 +03:00 [INF] Running ViGEmBus detection
2023-09-16 02:54:01.897 +03:00 [INF] Done
2023-09-16 02:54:01.898 +03:00 [INF] Running HidHide detection
2023-09-16 02:54:01.901 +03:00 [INF] Done
2023-09-16 02:54:01.902 +03:00 [INF] Running BthPS3 detection
2023-09-16 02:54:01.902 +03:00 [INF] Done
2023-09-16 02:54:01.902 +03:00 [INF] Finished refresh of all component detection, found 1 issues
2023-09-16 02:54:11.195 +03:00 [INF] ViGEmBusUpdaterUrlOutdatedOnClicked invoked
2023-09-16 02:54:11.555 +03:00 [INF] Starting refresh of all component detection
2023-09-16 02:54:11.555 +03:00 [INF] Refreshing phantom devices
2023-09-16 02:54:11.712 +03:00 [INF] Phantom device refreshing done
2023-09-16 02:54:11.712 +03:00 [INF] Running HidGuardian detection
2023-09-16 02:54:11.716 +03:00 [INF] Done
2023-09-16 02:54:11.716 +03:00 [INF] Running SCP detection
2023-09-16 02:54:11.716 +03:00 [INF] Done
2023-09-16 02:54:11.716 +03:00 [INF] Running ViGEmBus detection
2023-09-16 02:54:11.722 +03:00 [INF] Done
2023-09-16 02:54:11.722 +03:00 [INF] Running HidHide detection
2023-09-16 02:54:11.726 +03:00 [INF] Done
2023-09-16 02:54:11.726 +03:00 [INF] Running BthPS3 detection
2023-09-16 02:54:11.726 +03:00 [INF] Done
2023-09-16 02:54:15.812 +03:00 [INF] Finished refresh of all component detection, found 0 issues
noorus commented 1 year ago

To be clear, I ran it after a reboot, though. The system previously became unusable because nothing I plugged in to USB would come to life due to the hanging ioctl, I assume, so I had no choice but to reboot 😅

As additional info, I had a DualSense plugged in via USB all this time. Still have. Nothing else in my setup should relate to anything about this even remotely

nefarius commented 1 year ago

Alright, brilliant!