I'm having a problem with Device::USB, specifically I'm getting the following warning:
Argument "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..." isn't numeric in subroutine entry at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Device/USB/Device.pm line 585, <DATA> line 1.
This is then followed by a Segmentation fault.
This code from Device::USB that is causing this is:
sub get_descriptor { my $self = shift; my $type = shift; my $index = shift; $self->_assert_open(); my $buf = "\0" x MAX_BUFFER_SIZE; my $retlen = Device::USB::libusb_get_descriptor( $self->{handle}, $type, $index, $buf, MAX_BUFFER_SIZE ); return if $retlen < 0; return substr( $buf, 0, $retlen ); }
The argument $buf ends up as (nil) in Device::USB::libusb_get_descriptor (which is an Inline::C function) so there appears to be some problem with the argument passing.
Is this a bug in the Device::USB package?
Thanks in advance for any advice.
In reply to Problem trying to use Device::USB by scliffe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |