Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminating with "Something unforseen has happened..." in Device tab of HidHide Configuration Client #54

Closed
4 tasks done
Dgrif12 opened this issue Dec 29, 2021 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@Dgrif12
Copy link

Dgrif12 commented Dec 29, 2021

  • I have searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • I have read https://vigem.org/Community-Support/
  • This isn't a feature request or a discussion topic

Bug description

When switching from the "Applications" tab to the "Device" tab in the HidHide Configuration Client, an error is produced: "Something unforseen has happened which cannot be recovered from. Program execution has to be terminated. Sorry for the inconvenience."

Steps to reproduce

  • Install HidHide according to the guide, including prerequisites.
  • Make sure that conflicting software is removed or inactive.
  • Open HidHide Configuration Client
  • Switch tab to "Devices"

Actual result: "Devices" tab is displayed alongside mentioned error, preventing further interaction with the client and then terminates.
Expected result: "Devices" tab is displayed, showing active devices and allowing options to be enabled or disabled.

Screenshots

image
"Applications" tab including whitelisted apps.

image
"Devices" tab displaying the mentioned error.

image
Windows Event Viewer log of the error.

Machine info

Microsoft Surface Laptop 3

"Device Specifications"
Device name LAPTOP-2MD7FKAQ
Processor Intel(R) Core(TM) i5-1035G7 CPU @ 1.20GHz 1.50 GHz
Installed RAM 8.00 GB (7.60 GB usable)
Device ID Probably not important
Product ID 00342-23779-84602-AAOEM
System type 64-bit operating system, x64-based processor
Pen and touch Pen and touch support with 10 touch points

"Windows Specifications"
Edition Windows 10 Home
Version 21H1
Installed on ‎ 12/‎27/‎2021
OS build 19043.1415
Serial number 025769604257
Experience Windows Feature Experience Pack 120.2212.3920.0

HidHide Configuration Client v1.1.50.0

Controller connected: DS4 v.2 via USB

Any other helpful information

https://github.com/ViGEm/HidHide/blob/ada5cc1dc997ebbe9e4776c1855edbef404bdc66/HidHideClient/src/HidHideClient.cpp#L155
https://github.com/ViGEm/HidHide/blob/ada5cc1dc997ebbe9e4776c1855edbef404bdc66/HidHideCLI/src/HID.cpp#L286

I made this issue, even though there are 2 other similar issues on the repo for two reasons:

  • There are no open issues related to mine.
  • I believe the root of my issue is unique, since the Event Viewer produces different logs of the error compared to similar issues.
@nefarius nefarius self-assigned this Jan 1, 2022
@nefarius nefarius added the bug Something isn't working label Jan 1, 2022
@LivewareCascade
Copy link

Hi nefarius, just to also add my error report to the pile, I am having the same crash, but my error message is different. Mine is:

Description:
Exception at "src\HidHideClient.cpp" line 155 CHidHideClientApp::InitInstance Error code 0x0003 at \HID.cpp(280) `anonymous-namespace'::HidModelInfo: The system cannot find the path specified.

I am also on a tower PC.

This happens with AND WITHOUT the following Controllers connected:
VKB Gunfighter Joystick (L)
VKB Gunfighter Joystick (R)
VKB T-Rudder Pedals
Wooting Two Keyboard (all Xinput and DirectInput disabled)

@eclipsedmoon
Copy link

I was getting this error message upon load for the Applications tab, which I assumed was because a hard drive of mine recently failed.

For what it's worth, once I gave myself permission to read/write HKLM\System\CurrentControlSet\Services\HidHide\Parameters, I was able to remove the references to that hard drive. It didn't work, but once I deleted the entire Parameters key to let HidHide start "fresh" (which isn't an option when uninstalling/reinstalling), there was no more problem.

@AGedGamer13644
Copy link

AGedGamer13644 commented Feb 14, 2022

Same problem here.

Event viewer says the following:
Exception at "src\HidHideClient.cpp" line 155 CHidHideClientApp::InitInstance CONFIGRET 0x00000025 at \HID.cpp(100) `anonymous-namespace'::DeviceDescription: no such value

Device Specs:
Device name DESKTOP-AGED
Processor AMD Ryzen 5 2600 Six-Core Processor 4.20 GHz
Installed RAM 16.0 GB
Device ID -
Product ID -
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display

Windows Specs:
Edition Windows 11 Pro
Version 21H2
Installed on ‎11/‎22/‎2021
OS build 22000.493
Experience Windows Feature Experience Pack 1000.22000.493.0

@UnforsakenJake
Copy link

@Dgrif12 I have been struggling with this for months now and I believe it has something to do with me downloading it more than once on my drive. I went through the proper steps for uninstalling but this error message still pops up. Since December I've been forced to use DS4Windows exclusive mode, and honestly it isn't bad at all. If you open it upon startup and have "hide ds4 controller" checked then you should be ok from my experience. It doesn't randomly shift to shared mode and it allows myself to make changes to my profile even during a game. I really want to figure out how to reverse this HidHide error loop, but exclusive mode isn't half bad. Let us know if you come to any conclusions!

@FabTheZen
Copy link

I had a problem that seems very similar to what has been reported in this thread, specifically my event log said:
Exception at "src\HidHideClient.cpp" line 155 CHidHideClientApp::InitInstance CONFIGRET 0x00000025 at \HID.cpp(222) 'anonymous-namespace'::DeviceClassGuid: no such value

What I found out, thanks to Nefarius's huge help, is that I had a "ghost" USB device installed (wouldn't even appear in devmgmt.msc) that returned an invalid/empty GUID, which was causing the client/CLI program to crash. It's a bit of a chore to find and remove the device to blame, but if you are able to compile HidHideClient yourself you can probably accomplish this feat.

Here's what I needed to do to fix the problem: download the project, open the .sln file with Visual Studio, ignore the warnings, try to debug HidHideClient (right click on HidHideClient, click Debug->Start new instance), install the missing libraries from the Visual Studio Installer (just MFC C++ and Spectre mitigation libraries, I think), then put a breakpoint in HID.cpp on line 222 to check the deviceInstancePath of the USB device that caused the program to crash. Turns out I also needed a breakpoint on line 211 (thanks once again to Nefarius's insight for this) in order to get the proper values instead of just emptiness. After starting the debug again, I observed the program would constantly crash while trying to enumerate a specific USB device, as you can see below (low contrast pic because the debugger just crashed, as expected):

pic1

After knowing the instance path of the device to blame, Nefarius suggested to use a tool from Uwe Sieber called DeviceCleanup (you can find this one easily online) and enable the "Device ID" column from the program's menu bar (Options->Columns->Device ID). With a little bit of scrolling (you can sort by Device ID to save some time), I was able to find the device with ease. Here's how my device entry looked like:

pic2

I restarted the app as admin (File-> Restart 'As Administrator'), right clicked the device I found and clicked "Remove Device". At this point, HidHideClient wasn't crashing anymore when clicking the Devices tab. I've been told this is a bug within the program but it might take a little while to fix, so for now this is a pretty decent workaround in my opinion. Hopefully this works for you too! There might be more than just one device that causes the program to crash, so you may need to do this multiple times (I just needed to do it this once) but please make sure you only remove the actual ghost devices that are causing problems.

Remember: you ONLY need to compile HidHideClient, not the "HidHide" drivers, so you don't need to install WiX or any windows kernel driver addons for Visual Studio if asked.

@Zebrazilla
Copy link

Zebrazilla commented Apr 13, 2022

Had this problem myself and couldn't at first figure out where it came from, but this issue helped me understand that there could be a ghost device. Not wanting to install Visual Studio due to how bulky it tends to be and my system is low on storage, I went into device manager to see if I could find it anyway. Fortunately for me, the device causing problems for me was revealed by showing hidden devices:
image
I connected all physical and enabled all virtual controllers and singled out one hidden unconnected device:
image
Turns out this was added by another piece of software that I tried that didn't work aa intended, and not removed when that software was uninstalled. I just uninstalled the hidden device myself and after that I could go into devices tab in hidhide, no problem.

I believe troubleshooting could be helped in the future for those encountering this issue if it was possible for hidhide to throw an identifier for the problematic device(s) when the error occurs.

@AGedGamer13644
Copy link

Had this problem myself and couldn't at first figure out where it came from, but this issue helped me understand that there could be a ghost device. Not wanting to install Visual Studio due to how bulky it tends to be and my system is low on storage, I went into device manager to see if I could find it anyway. Fortunately for me, the device causing problems for me was revealed by showing hidden devices: image I connected all physical and enabled all virtual controllers and singled out one hidden unconnected device: image Turns out this was added by another piece of software that I tried that didn't work aa intended, and not removed when that software was uninstalled. I just uninstalled the hidden device myself and after that I could go into devices tab in hidhide, no problem.

I believe troubleshooting could be helped in the future for those encountering this issue if it was possible for hidhide to throw an identifier for the problematic device(s) when the error occurs.

Thank you so much, to clarify, what fixed my problem was what you said in your post and in addition to that, in the Human Interface Devices folder of the Device Manager, removing any "ghost" HID-Compliant Game Controllers.

@IngwiePhoenix
Copy link

Hello!

Tried to remove all hidden devices (had a mobo swap at the start of the year, so there were a good lot of them) but HidHide still shows the same error as before:

> .\HidHideCLI.exe --help
Error code 0x0005 at src\FilterDriverProxy.cpp(31) `anonymous-namespace'::Device: Zugriff verweigert

(admin powershell prompt - "Zugriff verweigert" -> "Access denied")

So I guess I will have to take the debugging route.

Is there any plan to implement a proper fix for this in an upcoming release?

Thanks!

@nefarius
Copy link
Owner

(admin powershell prompt - "Zugriff verweigert" -> "Access denied")

Make sure the UI isn't running at the same time, only one handle is allowed to be opened to the driver at the same time.

Is there any plan to implement a proper fix for this in an upcoming release?

None of the core contributors currently has any free time to maintain this project, so no 😛

@nefarius
Copy link
Owner

Should be fixed in this release. Please try it.

@e-t-l
Copy link

e-t-l commented Oct 14, 2022

@nefarius I can't get HidHide to run at all. When I try to launch the configuration client I get the "Something unforeseen" error. This is after a fresh install of v1.2.98 on Windows 11, 64-bit Intel. Never used HidHide or HidGuardian before, so I have no idea what could have happened with the install that would've caused it to fail right out of the box...

@nefarius
Copy link
Owner

Don't hijack other issues, use the support resources to get in touch, thanks.

@koemaeda
Copy link

koemaeda commented Feb 9, 2023

I had the same error (Windows 10), and in my case it went away when I disabled Bluetooth.
In my case this is not a valid solution, as I can only connect to my DS4 via Bluetooth (it won't work with a USB cable for some reason, but that's unrelated to HidHide).

This is the error I get in Event Viewer when I turn Bluetooth on again after HidHide is open on the Devices tab. HidHide just crashes immediately:

Faulting application name: HidHideClient.exe, version: 1.2.98.0, time stamp: 0x62b9ec5d
Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x2bd748bf
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x444c
Faulting application start time: 0x01d93c2701c3cf32
Faulting application path: C:\Program Files\Nefarius Software Solutions\HidHide\x64\HidHideClient.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: 2f20b82c-1bf9-412e-9c84-167179591d69
Faulting package full name: 
Faulting package-relative application ID: 

@naveen-verma19
Copy link

I had the same issue and couldn't figure out what..turns out I had an apple Magic Trackpad connected to my PC. I went to device manager-> human interface devices-> apple trackpad->uninstall , disconnect trackpad and it started working.
If you have any devices connected via usb/bluetooth, try disabling them in the device manager and it should work.

@nefarius
Copy link
Owner

@Jaybooon
Copy link

Just starting having this problem a week ago and i have tried what feels like everything but nothing has worked yet

@nefarius
Copy link
Owner

Folks, for real. Please use the search and a bit of common sense. See if this fixes the problem #151

Repository owner locked as resolved and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests