XHC WHB04B development?
- Finngineering
- Away
- Premium Member
-
Less
More
- Posts: 93
- Thank you received: 43
01 Mar 2026 06:51 #343680
by Finngineering
Replied by Finngineering on topic XHC WHB04B development?
Okay. Once you get a crash, post the output here and we can try to work it through together. Please ensure that you have some print statement in place of the commented out assert call, so if it fails there, we know about it. Something like:
if(r != 0) {
std::cout << "Usb::setupAsyncTransfer failed with code: " << r << std::endl;
}Please Log in or Create an account to join the conversation.
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1240
- Thank you received: 436
01 Mar 2026 11:31 - 01 Mar 2026 11:33 #343686
by Hakan
Replied by Hakan on topic XHC WHB04B development?
Got a crash today. Seems to be the usual way. At mode and screen switch.I have seen that libusb debug printout several times before.Attach are the log and also usb.cc and xhc-whb04b6.cc to be able to follow my printouts.
Last edit: 01 Mar 2026 11:33 by Hakan.
Please Log in or Create an account to join the conversation.
- Finngineering
- Away
- Premium Member
-
Less
More
- Posts: 93
- Thank you received: 43
01 Mar 2026 14:05 #343687
by Finngineering
Replied by Finngineering on topic XHC WHB04B development?
That was unexpected. For all the world, it looks like this get stuck in libusb somewhere. After the "is Open" debug text, the code does the following:
1. Function call XhcWhb04b6Component::enableReceiveAsyncTransfer()
2. From XhcWhb04b6Component::enableReceiveAsyncTransfer() call Usb::setupAsyncTransfer()
3. From Usb::setupAsyncTransfer() call libusb_submit_transfer()
4. From libusb_submit_transfer() call libusb_unref_device()
5. In libusb_unref_device() print "libusb: debug [libusb_unref_device] destroy device"
6. libusb_submit_transfer() never returns is my guess
Maybe some deadlock inside libusb. Whether that would be from some bug in libusb or because of some improper handling in the xhc-whb04b-6 component, I cannot say. At least at the moment. I'll look into it some more, but not right now.
1. Function call XhcWhb04b6Component::enableReceiveAsyncTransfer()
2. From XhcWhb04b6Component::enableReceiveAsyncTransfer() call Usb::setupAsyncTransfer()
3. From Usb::setupAsyncTransfer() call libusb_submit_transfer()
4. From libusb_submit_transfer() call libusb_unref_device()
5. In libusb_unref_device() print "libusb: debug [libusb_unref_device] destroy device"
6. libusb_submit_transfer() never returns is my guess
Maybe some deadlock inside libusb. Whether that would be from some bug in libusb or because of some improper handling in the xhc-whb04b-6 component, I cannot say. At least at the moment. I'll look into it some more, but not right now.
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds