capture error when multi-device using multi-thread to capture
Describe the bug When installing multi-device (at the first time, 4 devices/at the second time, 6 devices), create a thread for each device to do capturing. Store captures in a short queue. And the main thread gets the capture result from the queue. The function capturesync_get_capture() sometimes gets error.
To Reproduce
- Install multi-devices, 6 devices in my problem, connect and set them as external sync.
- Set the "synchronized_images_only" to true.
- Set Image Format to RGBA32, Set color resolution to 2016P, set depth resolution to NFOV_UNBINNED
- Start all devices, Create a thread for each device to do capturing
- Start running program to do capture. This error occurs.
Expected behavior
the program can get captures and runs without error. Logs
[error] [t=9128] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\capturesync\capturesync.c (143): replace_sample(). capturesync_drop, releasing capture early due to full queue TS: 2684400 type:Depth
Screen

Desktop (please complete the following information):
- OS with Version: Windows 1803
- SDK Version: 1.1.1
Additional context When I use 4 cameras with 720p color resolution, NFOV_2X2BINNED depth mode, this error did not occur. But when I increase to 6 devices, 2160p, NFOV_UNBINNED, this error occurs
You have too many devices on a single PC. USB can not keep up.
Get Outlook for Androidhttps://aka.ms/ghei36
From: fanyx [email protected] Sent: Saturday, July 27, 2019 1:02:13 AM To: microsoft/Azure-Kinect-Sensor-SDK [email protected] Cc: Subscribed [email protected] Subject: Re: [microsoft/Azure-Kinect-Sensor-SDK] capture error when multi-device using multi-thread to capture (#550)
Additional information When I increase the number of kinect device to 6, and increase the image resolution from 720p to 2160p. An error always occurs when capturing
Logs [error] [t=9128] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\capturesync\capturesync.c (143): replace_sample(). capturesync_drop, releasing capture early due to full queue TS: 2684400 type:Depth
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FAzure-Kinect-Sensor-SDK%2Fissues%2F550%3Femail_source%3Dnotifications%26email_token%3DACVJTJJH33O45N2A54CSHKDQBP6ILA5CNFSM4IHIJPA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26GQJY%23issuecomment-515663911&data=02%7C01%7CWes.Barcalow%40microsoft.com%7C2ea916a00d8d4568abae08d71268bc6a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636998113353834627&sdata=pc8HYucAAcqey3KV1oz3LZf4MlKbSQD1JDUFqqMx5uQ%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACVJTJPDX3RG7B67LOOOFATQBP6ILANCNFSM4IHIJPAQ&data=02%7C01%7CWes.Barcalow%40microsoft.com%7C2ea916a00d8d4568abae08d71268bc6a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636998113353834627&sdata=2GcZUgKpMXyQBMdLMq4G16gfaRPDPoLhfnM4uslNHjs%3D&reserved=0.
For your information, I connect 4 PCIe Data acquisitions to the PC. USBs are connected to data acquisitions. I think it may be ok.
@YuXinFan it is possible you are exceeding the available PCIe bandwidth on the machine.
We are happy that you had 4 devices running on a single PC.
Hey @YuXinFan Did you manage to fix the issue? I've got the same when running 6 sensors at 1080p
Hey @YuXinFan Did you manage to fix the issue? I've got the same when running 6 sensors at 1080p
@arkader I forgot the detail and I have left the project, but it has been fixed.
I remember that this error only occurs at the starting process. It has some probability of error or normally starts in my PC. if the device runs normally, it won't cause this error in the following running.
Maybe you can add a mechanism in your code to catch the error and mechanism restart it until normally start.