From: Moses M. <mo...@te...> - 2014-12-20 22:05:57
|
Hi, I have an application I wrote which has been working fine using libusb 1.0.9, and I think it was working with 1.0.16. But with 1.0.17 which is what is in Linux Mint 17, I get a segfault on the second run through libusb_handle_events_completed() or libusb_handle_events_timeout_completed() I have a thread that checks for packets from my device, and when one is received, the callback function re-submits the same transfer using libusb_submit_transfer(...); Running through the debugger, the first time through libusb_handle_events... works fine, and the transfer is re-submitted, but then the next time libusb_handle_events... is called I get the segmentation fault. Any ideas why this might be happening now when it has worked fine with previous versions of libusb? Here is the backtrace: #0 0x00007ffff79ad5ac in list_del (entry=0x7fffec002128) at ../../libusb/libusbi.h:130 #1 usbi_handle_transfer_completion (itransfer=itransfer@entry=0x7fffec002120, status=LIBUSB_TRANSFER_COMPLETED) at ../../libusb/io.c:1537 #2 0x00007ffff79b2664 in handle_bulk_completion (urb=0x711880, itransfer=0x7fffec002120) at ../../libusb/os/linux_usbfs.c:2262 #3 reap_for_handle (handle=0x7fffec001000) at ../../libusb/os/linux_usbfs.c:2480 #4 op_handle_events (ctx=0x7fffec0008c0, fds=0x7fffec002880, nfds=4, num_ready=0) at ../../libusb/os/linux_usbfs.c:2526 #5 0x00007ffff79ad358 in handle_events (ctx=ctx@entry=0x7fffec0008c0, tv=tv@entry=0x7ffff3fefe60) at ../../libusb/io.c:2046 #6 0x00007ffff79adf03 in libusb_handle_events_timeout_completed (ctx=0x7fffec0008c0, tv=<optimized out>, completed=0x7ffff3fefeb0) at ../../libusb/io.c:2126 #7 0x000000000041680f in usb_polling_thread (ptr=0x6aebe0 <master_control>) at ../master.cpp:958 Thanks, Moses |