Page 1 of 1

PB 6.30 b3 - ExamineHIDs() freezes

Posted: Fri Oct 10, 2025 11:45 pm
by User_Russian
This code

Code: Select all

ExamineHIDs()
While NextHID()
  
  Debug HIDInfo(#PB_HID_Product)
  Debug HIDInfo(#PB_HID_Manufacturer)
  Debug HIDInfo(#PB_HID_VendorId)
  Debug HIDInfo(#PB_HID_ProductId)
  Debug HIDInfo(#PB_HID_Path)
  Debug HIDInfo(#PB_HID_SerialNumber)
Wend
sometimes it freezes. Need to run PB IDE with sudo in the terminal. If you run it too many times, it may freeze for a few minutes.
Maybe this is the reason viewtopic.php?p=646123#p646123

Re: PB 6.30 b3 - ExamineHIDs() freezes

Posted: Sat Oct 11, 2025 4:53 pm
by User_Russian
Probably the reason freezes in libusb backend.
For testing, I compiled hidapi using hidraw backend and the application never freezes.
To check this, copy this file to folder "purelibraries/linux/libraries/" for PB Linux x86.
You also need to add a line in code for use udev.

Code: Select all

Import "-ludev" : EndImport

Re: PB 6.30 b3 - ExamineHIDs() freezes

Posted: Sat Oct 11, 2025 8:30 pm
by User_Russian
When I run in the terminal an application using libusb backend, I see this text.

Code: Select all

purebasic_compilation0.out: ../../libusb/os/threads_posix.h:58: usbi_mutex_destroy: Verification statement «pthread_mutex_destroy(mutex) == 0» not completed.