You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When closing libsurvive by stopping Unitys playmode it freezes during survive_vive_close() call.
The survive_vive_close() function is stuck in an infinite loop as it is waiting for survive_handle_close_request_flag() to close the USB connection which it never does because usbInfo->request_close is never true.
Desktop (please complete the following information):
OS: Windows
Version 11
Additional context
I tried to figure out where the request_close is supposed to be set to true but I could not figure it out yet.
I guess it is supposed to be set from another thread?
intsurvive_vive_close(SurviveContext*ctx, void*driver) {
SurviveViveData*sv=driver;
#ifndefHIDAPIlibusb_hotplug_deregister_callback(sv->usbctx, sv->callback_handle);
#endiffor (inti=0; i<sv->udev_cnt; i++) {
survive_close_usb_device(sv->udev[i]);
}
while (sv->udev_cnt) { // never gets to 0#ifndefHIDAPIsurvive_release_ctx_lock(ctx);
libusb_handle_events(sv->usbctx);
survive_get_ctx_lock(ctx);
#endiffor (inti=0; i<sv->udev_cnt; i++) {
structSurviveUSBInfo*usbInfo=sv->udev[i];
if (survive_handle_close_request_flag(usbInfo)) { //never returns true as 'usbInfo->request_close' is always falsei--;
}
}
}
survive_vive_usb_close(sv);
free(sv);
return0;
}
The text was updated successfully, but these errors were encountered:
Peaj
linked a pull request
Sep 12, 2024
that will
close
this issue
Describe the bug
When closing libsurvive by stopping Unitys playmode it freezes during
survive_vive_close()
call.The
survive_vive_close()
function is stuck in an infinite loop as it is waiting forsurvive_handle_close_request_flag()
to close the USB connection which it never does becauseusbInfo->request_close
is never true.Desktop (please complete the following information):
Additional context
I tried to figure out where the
request_close
is supposed to be set to true but I could not figure it out yet.I guess it is supposed to be set from another thread?
The text was updated successfully, but these errors were encountered: