Libusbpp icon indicating copy to clipboard operation
Libusbpp copied to clipboard

win10, run libusbTest.exe, crash, report "Unhandled exception thrown: write access violation. entry->next was nullptr.".

Open hiquokka opened this issue 4 years ago • 0 comments

     hi, i comipler the lastest code( 10.0.19042.541, vs2019 16.7.4,  ZPL Priter: USB\VID_1FC9&PID_2016\

or USB\VID_154F&PID_1300), except modifyed the vid && pid of ZPL Printer. then it crashed. tpis is: Unhandled exception thrown: write access violation. entry->next was nullptr. Detail: Call Stack:

LibusbTest.exe!list_del(list_head * entry) Line 203 C LibusbTest.exe!handle_event_trigger(libusb_context * ctx) Line 2116 C LibusbTest.exe!handle_events(libusb_context * ctx, timeval * tv) Line 2234 C LibusbTest.exe!libusb_handle_events_timeout_completed(libusb_context * ctx, timeval * tv, int * completed) Line 2341 C LibusbTest.exe!libusb_handle_events_completed(libusb_context * ctx, int * completed) Line 2440 C LibusbTest.exe!LibUSB::TransferImpl::Start() Line 155 C++ LibusbTest.exe!LibUSB::Transfer::Start() Line 122 C++ LibusbTest.exe!main(int argc, char * * argv) Line 114 C++ [External Code] kernel32.dll![Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] Unknown

debug the code, it stop at(libusbi.h): entry->next->prev = entry->prev; context is : static inline void list_del(struct list_head *entry) { entry->next->prev = entry->prev; entry->prev->next = entry->next; entry->next = entry->prev = NULL; }

   finally,  i mean, i known this problem is not caused by your library, but libusb.  
   running at win32 platform,  if someone run the exe which added the libusb wrapper DLL file(like your project libusbTest.exe) ,

the exe crashed.

hiquokka avatar Sep 30 '20 07:09 hiquokka