Closed ttsesm closed 8 years ago
The program has unexpectedly finished.
For this error, you can run Protonect from Visual Studio and catch the error.
I don't see anything wrong in your qtcreator messages. Protonect itself depends on libfreenect2.lib and glfw3dll.lib (if you use OpenGL viewer here).
Hi @xlz, thanks for the reply. After following your advice and trying to deploy Protonect in Visual Studio line by line it seems that the following line causes the problem:
std::string serial = freenect2.getDefaultDeviceSerialNumber();
running the debugger it gives me the following message:
Unhandled exception at 0x00007FFD8D8AD164 (msvcr120d.dll) in Protonect.exe: 0xC0000005: >Access violation reading location 0xFFFFFFFFFFFFFFFF.
Protonect.exe!std::allocator
::deallocate(char * _Ptr, unsigned int64 formal) Line 574 C++
I do not know does that gives you any clue what might be the problem?
Update:
Also another thing that I noticed is that even if I pass manually the serial number std::string serial = "014947350647";
the following code:
if (pipeline)
{
/// [open]
dev = freenect2.openDevice(serial, pipeline);
/// [open]
}
else
{
dev = freenect2.openDevice(serial);
}
if (dev == 0)
{
std::cout << "failure opening device!" << std::endl;
return -1;
}
gives me failure opening the device.
Unhandled exception at 0x00007FFD8D8AD164 is probably just failure to get the serial number string. I think there is some known bug here that does not parse the string correctly, but it's not the problem for you.
Anyway, you are having usb problems. You can set environment variables LIBUSB_DEBUG=3, and run Protonect.exe 014947350647
and see what is the error.
Hi @xlz setting the environment variable LIBUSB_DEBUG=4 as you said I got the following output:
$ ./Protonect.exe 014947350647
hello world!
Environment variables: LOGFILE=
[ 0.000000] [00000edc] libusb: debug [libusb_init] created default context [ 0.000000] [00000edc] libusb: debug [libusb_init] libusb v1.0.20.11015 [ 0.000000] [00000edc] libusb: debug [windows_init] Windows 8.1 64-bit [ 0.000000] [00000edc] libusb: debug [setup_cancel_io] Will use CancelIoEx for I/O cancellation [ 0.000000] [00000edc] libusb: debug [winusbx_init] using libusbK DLL for universal access [ 0.000000] [00000edc] libusb: debug [winusbx_init] libusbK version: 3.0.7.0 [ 0.000000] [00000edc] libusb: debug [winusbx_init] initalized sub API libusbK [ 0.000000] [00000edc] libusb: debug [winusbx_init] initalized sub API libusb0 [ 0.000000] [00000edc] libusb: debug [winusbx_init] initalized sub API WinUSB [ 0.000000] [00000edc] libusb: debug [windows_init] hires timer available (Frequency: 1558891 Hz) [ 0.000000] [00000edc] libusb: debug [windows_init] timer thread will run on core #0 [ 0.000000] [00000edc] libusb: debug [htab_create] using 1021 entries hash table [ 0.000000] [00000edc] libusb: debug [usbi_add_pollfd] add fd 0 events 1 [ 0.000000] [00000edc] libusb: debug [libusb_get_device_list] [ 0.000000] [00001220] libusb: debug [libusb_get_next_timeout] no URBs, no timeout! [ 0.000000] [00001220] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.000000] [00001220] libusb: debug [handle_events] poll fds modified, reallocating [ 0.000000] [00001220] libusb: debug [handle_events] poll() 1 fds with timeout in 100ms [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [31C] [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [2CF] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): USBHUB3 [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [3CD] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): USBHUB3 [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [3D3] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): usbhub [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [132] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): USBHUB3 [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [3B0] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): USBHUB3 [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [399] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): USBHUB3 [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [11D] [ 0.000000] [00000edc] libusb: debug [get_api_type] driver(s): usbhub [ 0.000000] [00000edc] libusb: debug [get_api_type] matched driver name against HUB API [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [217] [ 0.000000] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 132 [ 0.000000] [00000edc] libusb: debug [init_device] got bus number from ancestor #2 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 25 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 2, addr: 2, depth: 1, port: 1): '.\USB#VID_8087&PID_8001#5&37F67426&0&1' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [32A] [ 0.071147] [00000edc] libusb: debug [init_device] got bus number from ancestor #3 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 34 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 6, depth: 1, port: 3): '.\USB#VID_046D&PID_C063#6&271BB1DA&0&3' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [393] [ 0.071147] [00000edc] libusb: debug [init_device] got bus number from ancestor #2 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 32 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 7, depth: 1, port: 1): '.\USB#VID_0424&PID_4060#F120C60200A3' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [30B] [ 0.071147] [00000edc] libusb: debug [init_device] got bus number from ancestor #2 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 177 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 2, depth: 1, port: 7): '.\USB#VID_8087&PID_0A2A#5&2CB2F022&0&7' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 3CD [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 31 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 8, depth: 1, port: 15): '.\USB#VID_045E&PID_02D9#5&2CB2F022&0&15' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 399 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 41 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 3, depth: 1, port: 3): '.\USB#VID_0424&PID_2514#5&2CB2F022&0&3' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 217 [ 0.071147] [00000edc] libusb: debug [init_device](bus: 2, addr: 1, depth: 0, port: 0): '.\USB#ROOT_HUB20#4&E355AE&0' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 3D3 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 25 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 9, depth: 1, port: 4): '.\USB#VID_045E&PID_02D9#5&2CB2F022&0&4' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] extra GUID: {A30A6AEE-EA23-4F71-8D2E-521D1CC1917C} [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [8F] [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 214 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 11, depth: 2, port: 1): '.\USB#VID_045E&PID_02C4#014947350647' [ 0.071147] [00000edc] libusb: debug [discovered_devs_append] need to increase capacity [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] allocating new device for session [2E6] [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 34 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 4, depth: 2, port: 2): '.\USB#VID_413C&PID_2106#6&271BB1DA&0&2' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 11D [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 1, depth: 0, port: 0): '.\USB#ROOT_HUB30#4&2DEC54A9&0&0' [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 3B0 [ 0.071147] [00000edc] libusb: debug [init_device] found 1 configurations (active conf: 1) [ 0.071147] [00000edc] libusb: debug [cache_config_descriptors] cached config descriptor 0 (bConfigurationValue=1, 25 bytes) [ 0.071147] [00000edc] libusb: debug [init_device](bus: 1, addr: 5, depth: 2, port: 1): '.\USB#VID_0424&PID_2640#6&271BB1DA&0&1' [ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): libusbK [ 0.071147] [00000edc] libusb: debug [get_api_type] matched driver name against libusbK [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 8F [ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): HidUsb [ 0.071147] [00000edc] libusb: debug [get_api_type] matched driver name against HID API [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 32A [ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): HidUsb [ 0.071147] [00000edc] libusb: debug [get_api_type] matched driver name against HID API [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 2E6 [ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): BTHUSB [ 0.071147] [00000edc] libusb: debug [get_api_type] lower filter driver(s): ibtusb [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 30B [ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): USBSTOR [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] found existing device for session 393 [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL01#2&2C0640C3&0&0000' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL02#2&2C0640C3&0&0001' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL03#2&2C0640C3&0&0002' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL04#2&2C0640C3&0&0003' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] setting HID interface for [2E6]: [ 0.071147] [00000edc] libusb: debug [set_hid_interface] interface[0] = .\HID#VID_413C&PID_2106#7&32CCF2C0&0&0000#{4D1E55B2-F16F-11CF-88CB-001111000030} [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL05#2&2C0640C3&0&0004' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL06#2&2C0640C3&0&0005' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] setting HID interface for [32A]: [ 0.071147] [00000edc] libusb: debug [set_hid_interface] interface[0] = .\HID#VID_046D&PID_C063#7&2C5AE837&0&0000#{4D1E55B2-F16F-11CF-88CB-001111000030} [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID#IRDEVICEV2&COL07#2&2C0640C3&0&0006' (non USB HID, newly connected, etc.) - ignoring [ 0.071147] [00000edc] libusb: debug [windows_get_device_list] unlisted ancestor for '.\HID[Info] [Freenect2Impl] 12 usb devices connected
[ 0.071147] [00000edc] libusb: debug [get_api_type] driver(s): libusbK [ 0.071147] [00000edc] libusb: debug [get_api_type] matched driver name against libusbK [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 2.2 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.6 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.7 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.2 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 2.1 [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 2.0 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.9 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_open] open 1.11 [ 0.071147] [00000edc] libusb: debug [libusb_alloc_transfer] transfer 0000009FB854E260 [ 0.071147] [00000edc] libusb: debug [libusb_submit_transfer] transfer 0000009FB854E260 [ 0.071147] [00000edc] libusb: debug [libusb_claim_interface] interface 0 [ 0.071147] [00000edc] libusb: debug [winusbx_claim_interface] claimed interface 0 [ 0.071147] [00000edc] libusb: debug [libusb_get_config_descriptor] index 0 [ 0.071147] [00000edc] libusb: debug [parse_configuration] skipping descriptor 0xb [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor b [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 25 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 81 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 02 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 83 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 82 to interface 0 [ 0.071147] [00000edc] libusb: debug [auto_claim] auto-claimed interface 0 for control request [ 0.071147] [00000edc] libusb: debug [winusbx_submit_control_transfer] will use interface 0 [ 0.071147] [00000edc] libusb: debug [usbi_add_pollfd] add fd 1 events 1 [ 0.071147] [00001220] libusb: debug [handle_events] poll() returned 1 [ 0.071147] [00001220] libusb: debug [handle_events] caught a fish on the event pipe [ 0.071147] [00001220] libusb: debug [handle_events] someone updated the poll fds [ 0.071147] [00000edc] libusb: debug [libusb_get_next_timeout] next timeout in 0.999358s [ 0.071147] [00000edc] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.071147] [00000edc] libusb: debug [handle_events] poll fds modified, reallocating [ 0.071147] [00000edc] libusb: debug [handle_events] poll() 2 fds with timeout in 1000ms [ 0.071147] [00001220] libusb: debug [libusb_get_next_timeout] next timeout in 0.999358s [ 0.071147] [00001220] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling [ 0.071147] [00000edc] libusb: debug [handle_events] poll() returned 1 [ 0.071147] [00000edc] libusb: debug [windows_handle_events] checking fd 1 with revents = 0001 [ 0.071147] [00000edc] libusb: debug [usbi_remove_pollfd] remove fd 1 [ 0.071147] [00000edc] libusb: debug [windows_transfer_callback] handling I/O completion with errcode 0, size 4 [ 0.071147] [00000edc] libusb: debug [libusb_release_interface] interface 0 [ 0.071147] [00000edc] libusb: debug [auto_release] auto-released interface 0 [ 0.071147] [00000edc] libusb: debug [usbi_handle_transfer_completion] transfer 0000009FB854E260 has callback 00007FFFB41FE9C0 [ 0.071147] [00000edc] libusb: debug [sync_transfer_cb] actual_length=4 [ 0.071147] [00000edc] libusb: debug [libusb_free_transfer] transfer 0000009FB854E260 [ 0.071147] [00001220] libusb: debug [libusb_get_next_timeout] no URBs, no timeout! [ 0.071147] [00000edc] libusb: debug [libusb_alloc_transfer] transfer 0000009FB854E260 [ 0.071147] [00001220] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.071147] [00000edc] libusb: debug [libusb_submit_transfer] transfer 0000009FB854E260 [ 0.071147] [00001220] libusb: debug [handle_events] poll fds modified, reallocating [ 0.071147] [00001220] libusb: debug [handle_events] poll() 1 fds with timeout in 100ms [ 0.071147] [00000edc] libusb: debug [libusb_claim_interface] interface 0 [ 0.071147] [00000edc] libusb: debug [winusbx_claim_interface] claimed interface 0 [ 0.071147] [00000edc] libusb: debug [libusb_get_config_descriptor] index 0 [ 0.071147] [00000edc] libusb: debug [parse_configuration] skipping descriptor 0xb [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor b [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 30 [ 0.071147] [00000edc] libusb: debug [parse_endpoint] skipping descriptor 25 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 81 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 02 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 83 to interface 0 [ 0.071147] [00000edc] libusb: debug windows_assign_endpointsassigned endpoint 82 to interface 0 [ 0.071147] [00000edc] libusb: debug [auto_claim] auto-claimed interface 0 for control request [ 0.071147] [00000edc] libusb: debug [winusbx_submit_control_transfer] will use interface 0 [ 0.071147] [00000edc] libusb: debug [usbi_add_pollfd] add fd 1 events 1 [ 0.071147] [00001220] libusb: debug [handle_events] poll() returned 1 [ 0.071147] [00001220] libusb: debug [handle_events] caught a fish on the event pipe [ 0.071147] [00001220] libusb: debug [handle_events] someone updated the poll fds [ 0.071147] [00000edc] libusb: debug [libusb_get_next_timeout] next timeout in 1.000000s [ 0.071147] [00000edc] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.071147] [00000edc] libusb: debug [handle_events] poll fds modified, reallocating [ 0.071147] [00001220] libusb: debug [libusb_get_next_timeout] next timeout in 1.000000s [ 0.071147] [00000edc] libusb: debug [handle_events] poll() 2 fds with timeout in 1000ms [ 0.071147] [00001220] libusb: debug [libusb_handle_events_timeout_completed] another thread is doing event handling [ 0.071147] [00000edc] libusb: debug [handle_events] poll() returned 1 [ 0.071147] [00000edc] libusb: debug [windows_handle_events] checking fd 1 with revents = 0001 [ 0.071147] [00000edc] libusb: debug [usbi_remove_pollfd] remove fd 1 [ 0.071147] [00000edc] libusb: debug [windows_transfer_callback] handling I/O completion with errcode 0, size 26 [ 0.071147] [00000edc] libus[Info] [Freenect2Impl] found valid Kinect v2 @1:11 with serial 014947350647 [Info] [Freenect2Impl] found 1 devices failure opening device! b: debug [libusb_release_interface] interface 0 [ 0.071147] [00000edc] libusb: debug [auto_release] auto-released interface 0 [ 0.071147] [00000edc] libusb: debug [usbi_handle_transfer_completion] transfer 0000009FB854E260 has callback 00007FFFB41FE9C0 [ 0.071147] [00000edc] libusb: debug [sync_transfer_cb] actual_length=26 [ 0.071147] [00000edc] libusb: debug [libusb_free_transfer] transfer 0000009FB854E260 [ 0.071147] [00001220] libusb: debug [libusb_get_next_timeout] no URBs, no timeout! [ 0.071147] [00001220] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.071147] [00001220] libusb: debug [handle_events] poll fds modified, reallocating [ 0.071147] [00001220] libusb: debug [handle_events] poll() 1 fds with timeout in 100ms [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.4 [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_get_device_descriptor] [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.5 [ 0.071147] [00000edc] libusb: debug [libusb_unref_device] destroy device 1.3 [ 0.180563] [00001220] libusb: debug [handle_events] poll() returned 0 [ 0.180563] [00001220] libusb: debug [libusb_get_next_timeout] no URBs, no timeout! [ 0.180563] [00001220] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling [ 0.180563] [00001220] libusb: debug [handle_events] poll() 1 fds with timeout in 100ms [ 0.295474] [00001220] libusb: debug [handle_events] poll() returned 0 [ 0.295474] [00000edc] libusb: debug [libusb_exit] [ 0.295474] [00000edc] libusb: debug [libusb_exit] destroying default context [ 0.295474] [00000edc] libusb: warning [libusb_exit] some libusb_devices were leaked [ 0.295474] [00000edc] libusb: warning [libusb_exit] application left some devices open [ 0.295474] [00000edc] libusb: debug [usbi_remove_pollfd] remove fd 0 [ 0.295474] [000012c0] libusb: debug [windows_clock_gettime_threaded] timer thread quitting
do you see something wrong?
But I was wondering why the Protonect.exe compiled together with the library in the beginning runs without a problem and the customized project from visual studio or qtcreator using the compiled libfreenect2 driver does not. If it is a usb problem as you say I should had problem in both cases, shouldn't I?
I thought you reported
it seems that I am getting the above error also when I run the Protonect.exe example that it has been built with the libfreenect2 library
?
OK, it seems it is not a usb problem. "failure opening device" happened because the default serial number was different than expected. It is still something wrong with std::string.
I think it is this http://stackoverflow.com/questions/2322095/why-does-this-program-crash-passing-of-stdstring-between-dlls
Hi @xlz thanks for the feedback and the link. Just for verification in the beginning I was getting the following error:
[Error] [RgbPacketStreamParser] packetsize or sequence doesn't match!
only in the customized project. But afterwards in both cases but I guess it might had to do with the problem explained in the link you pointed me out.
Now regarding the actual issue changing from debug mode to release mode in my custom visual studio project seems to solve the problem. However, does that mean that I cannot compile my custom projects in debug mode? Actually if I understood correctly this is happening because libfreenect2 is compiled in release mode right? Will I need to recompile libfreenect2 in debug mode?
You were using Release mode qt libraries with Debug mode libfreenect2 and that was the problem. If you want to use Debug mode lilbfreenect2, you will need Debug mode qt libraries.
Hi @xlz thanks for the feedback. Well, problem seems to be solved so I will close it. Thanks again for the help.
Hi guys, many thanks for your efforts to provide us the library. I have followed and finished successfully the procedure for installing libfreenect2 library in windows 8 through the README. Moreover, if I run the built Protonect.exe from command line it gives me without problem the output from the 4 views. However, I tried now to compile and run the Protonect example by copying the source and another one of mine through qtcreator and while it compiles if I try to run it, it gives the following error:
also in the terminal of qtcreator I am getting the following message:
can you understand what might be the problem. Thank you for your time.
Update: ok it seems that I am getting the above error also when I run the Protonect.exe example that it has been built with the libfreenect2 library. However, this does not seem to prevent from showing the output. Any clues about what is happening? From what I noticed from my example is also that it cannot acquire the serial number of the device though from the above output it says that it found it.
Also another question is which libraries do I need to include in my project? is it libfreenect2.lib enough or I need also glfw3dll.lib, libusb-1.0.lib, turbojpeg.lib, OpenCL.lib, and opengl32.lib as well in addition with the corresponding include folders. Sorry for the naive questions but I am trying to be sure and limit down the possible causes.