Comments (4)
Thanks for the detailed bug report and the stack trace 😃. It could be some kind of bug in libusb's implementation of libusb_control_transfer
. Could you dig a little bit deeper to find the place/line where libusb_control_transfer
is failing (maybe using gdb
)?
from xow.
Well, the problem is that handle
is a nullpointer and libusb_control_transfer
does not like nullpointer as handles.
I'm not sure how to handle that correctly (pun intended).
Also there is a use after free in Log::error("Error in bulk read: %d", transfer->status);
as transfer is freed already. I was too lazy to make a PR for that, please fix in one of your commits.
from xow.
Ah, now I see. So UsbDevice::close
sets the handle to nullptr
while the dongle thread is still doing its control transfers. The only reason this is being done is to prevent UsbDevice::open
from opening the device multiple times. I'm going to replace this with a boolean variable to indicate if the device is currently open. libusb_control_transfer
will probably return LIBUSB_ERROR_NO_DEVICE
but thats at least better than a crash.
Also there is a use after free
Good catch 👍. Will push that together with the other fix.
from xow.
@StopMotionCuber I've put checks into place that handle the edge case of removing the device while the pairing is in progress. This also has the benefit of logging the exact place where it errors (as one would expect). Please see if commit 365c2bc fixes your issues.
from xow.
Related Issues (20)
- Headset recognize as pad HOT 1
- high temperature when plug in xbox wireless adapter. HOT 3
- make error 127 - firmware.bin HOT 1
- All my controllers stopped working in steam
- The controller freezes HOT 3
- Controller immediately disconnects after connecting HOT 2
- make: *** No targets specified and no makefile found. Stop. HOT 4
- How to disable vibration
- Debian packaginfg HOT 1
- Cabextract missing
- xow uses 50% CPU on idle HOT 2
- Could not resolve host: download.windowsupdate.com
- XOW Not connecting the controller to the usb dongle HOT 1
- fix bug in install instructions HOT 1
- Issues Installing on steamdeck
- Does it detect xbox controller motion?
- GipMessageClass Enum
- Core dump seconds after connecting controller
- Unable to Migrate from `xow` to `xone` HOT 2
- #include <cstddef>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xow.