Nuand / bladeRF

bladeRF USB 3.0 Superspeed Software Defined Radio Source Code
http://nuand.com
Other
1.13k stars 455 forks source link

Assert in win32 build. #128

Closed LazyDodo closed 10 years ago

LazyDodo commented 10 years ago
Assertion failed!

Program: F:\projects\sdrsharp_mirics\Debug\bladeRF.dll
File: F:\blade\bladeRF\host\libraries\libbladeRF\s...\libusb.c
Line: 1725

Expression: transfer->length == transfer->actual_length

https://github.com/Nuand/bladeRF/blob/master/host/libraries/libbladeRF/src/backend/libusb.c#L1725

bpadalino commented 10 years ago

Is this a bug? I am not sure what the action should be from the library standpoint if a request came back with less than the actual length being transferred for a bulk transfer. Do you resubmit with the rest?

litghost commented 10 years ago

This is a bug. The library needs to handle shorter returns. This is nominal behavior when the FX3 is out of data to send.

bpadalino commented 10 years ago

So is the solution to just resubmit the transfer of the shorter length? What about minimum transfer sizes? Do those need to be upheld with the leftover data?

LazyDodo commented 10 years ago

What we should definitely NOT do is bother the end user with a big ass popup with this exception with a abort/retry/ignore options. (also, assertions on in release builds?) I say pass the proper length to the callback and remove the assert.