depthai_hand_tracker icon indicating copy to clipboard operation
depthai_hand_tracker copied to clipboard

Edge mode: "Fatal error: ResourceLocker (358), Couldn't read data from stream: 'manager_out' (X_LINK_ERROR)"

Open arnlen opened this issue 8 months ago • 1 comments

Error

When running demo.py in edge mode, as soon as a detected hand is close from the camera (≈ 30 cm), I got the following crash:

[1844301091BC331300] [20.1] [13.713] [system] [critical] Fatal error. Please report to developers. Log: 'ResourceLocker' '358'
Traceback (most recent call last):
  File "/Users/[...]/main_menu_manager.py", line 102, in <module>
    hand_controller.loop()
  File "/Users/[...]/HandController.py", line 255, in loop
    frame, hands, bag = self.tracker.next_frame()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/[...]/HandTrackerEdge.py", line 263, in next_frame
    res = marshal.loads(self.q_manager_out.get().getData())
                        ^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'manager_out' (X_LINK_ERROR)'

I read this issue about USB2 mode, and enabled it in HandTrackerEdge.py, but it didn't resolve the issue.

To reproduce

  • Run demo.py -e
  • Wave your hand in front of the camera, while getting closer and closer
  • At some point, you'll get the crash

What I noticed

  • The issue doesn't occur when running on the host
  • It seems to be somehow connected with the screen's borders, since most of the crashes occur when a section of my hand reach the border of the screen.
  • The "FIVE" pose seems to be more prone to generate crash. Others poses also crash, but only once getting closer to the camera (I guess it's related to the point above: hitting screen border)

Setup

  • OS: Mac OS X 14.0
  • Python: version 3.11.5
  • Libs: depthai 2.22.0.0 and depthai-sdk 1.12.0
  • Tested cameras: OAK-D Pro and OAK-D Lite (same results)

arnlen avatar Oct 09 '23 15:10 arnlen

Not sure if this helps, but I am getting a similar error and I've been able to narrow it down to line #144 in template_manager_script_solo.py

Have no idea what is causing it yet, but all I know is that if I add a continue before that line I don't get the error, and if I add a continue after that line, I get an error. Will update if/when I find out more.

jim-spot avatar Apr 25 '24 07:04 jim-spot