Skip to content

The device disappear after calling close() for a few seconds. #539

@hanyazou

Description

@hanyazou

While investigating #517, I've noticed that it takes a few seconds to restart the Kinect device after calling close(). And the USB deice disappear for a second. This means that you must wait for a while before you call enumerateDevices() and openDevice() after calling close(). This issue might depend Mac OS X.

You can reproduce this issue with stock Protonect.

case 1 (hungup)

$ ./bin/Protonect; sleep 0; ./bin/Protonect

  1. Stop with ESC key after the first Protonect shows the image.
  2. Second Protonect does not show any images.

[Info] [Freenect2DeviceImpl] enabling usb transfer submission...
[Info] [Freenect2DeviceImpl] submitting usb transfers...
[Info] [Freenect2DeviceImpl] started
device serial: 005697142447
device firmware: 4.0.3912.0
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
// no messages. it seems that no data come from the device.

In this case Ctrl-C and ESC can not stop the second Protonect. It requires kill -KILL.

case 2 (error)

$ ./bin/Protonect; sleep 1; ./bin/Protonect

  1. Stop with ESC key after the first Protonect shows the image.
  2. Second Protonect can't detect the device.

[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 12 usb devices connected
[Info] [Freenect2Impl] found 0 devices
no device connected!

case 3 (this works fine)

$ ./bin/Protonect; sleep 3; ./bin/Protonect

  1. Stop with ESC key after the first Protonect shows the image.
  2. Second Protonect shows the image also.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions