Page 1 of 1
[Done] 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.
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.
Re: PB 6.30 b3 - ExamineHIDs() freezes
Posted: Mon Oct 13, 2025 8:21 am
by Fred
May be it's better to use hidapi on Linux then ?
Re: PB 6.30 b3 - ExamineHIDs() freezes
Posted: Mon Oct 13, 2025 11:16 pm
by User_Russian
Yes, I think it's better to use hidraw backend.
It works more stably and there are no freezes of the function ExamineHIDs().
Re: PB 6.30 b3 - ExamineHIDs() freezes
Posted: Tue Oct 14, 2025 9:35 am
by Fred
Thanks, switched for next beta.
Re: PB 6.30 b3 - ExamineHIDs() freezes
Posted: Sat Oct 25, 2025 7:36 pm
by User_Russian
Function ExamineHIDs() in beta 4 doesn't freeze. Thank you.