Open lscheffler opened 1 year ago
This sounds like the controller gets a name that contains odd/invalid UTF8 characters when connected via Bluetooth.
It's a common MS XBOX Elite 2 Controller Nothing fancy (except, MS ....)
Anything I can provide / check?
The name I see in the BT list in the registry does not hold char 0xE4, and is shorter then 42 signs
Name and LEName in HKLM\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices
are just 24 byte RegBinary) followed by 0x00
Similar error happens to me:
My Controller is a Xbox Wireless Controller M.
My Windows Locale is set to de;Deutsch
Would it break anything to just
- self.name = data.name.decode("utf-8")
+ self.name = data.name.decode("utf-8", errors="ignore")
Unknown without trying it out. I suspect that it might result in empty strings which could become problematic if places expect them to be non-zero. Also this won't fix the issue but merely hide it. Somewhere something isn't consistent enough with UTF and causes that problem, so fixing that would be the actual solution.
In general you are right.
But you agree that Microsoft will hardly change something because a third party tool fails? The error renders Joystick Gremlin useless if the XBOX ELITE 2 controller is connected via bluetooth. If there is a string, or a generic device xx is a minor problem. All my choice is now using the controller via USB, because else nothing works as expected.
Would it break anything to just
- self.name = data.name.decode("utf-8") + self.name = data.name.decode("utf-8", errors="ignore")
I have FINALLY managed to build Joystick Gremlin with this patch (not so easy considering the age of the dependencies), and I can confirm that it does not crash anymore.
I do not know if this is related to #347 .
New Device: XBOX ELITE 2 controller
The error started on my comp today. I can turn the error on off in turning my XBOX controller on / off. All other devices are running. In special, it happens when the controller is connected via Bluetooth. So I have
This is a dump of the messagebox showing the error - that what the log shows too.
This error is followed by the Failed to execute script messagebox.
Let me know if I can provide additional information.