depthai_demo.py fails with exception and told me to report to developers
See original GitHub issueRunning depthai_demo.py
with face-detection-retail-0004
for 12 shaves throws exception and tells me to report to developers.
Setup
- Microsoft Windows [Version 10.0.19044.1348]
- depthai repo at
main
currently d51f032df0a100f2879ca7318da333fb779cb6ec - python 3.9.5 64-bit
Repro
- Follow instructions from https://docs.luxonis.com/en/latest/pages/tutorials/first_steps/#setup
- activate the venv
- Run
python depthai_demo.py
- see the default model run correctly
- change model to
face-detection-retail-0004
- click apply restart
- restart depthai_demo.py if the app completely exits
- change model to
face-detection-retail-0004
again if the app exited - see face model working
- change shaves to 12
- click apply restart
- restart depthai_demo.py if the app completely exits
- change model to
face-detection-retail-0004
again if the app exited - click apply restart
- download happens in background… then…
Result
App throws exception. Tells me to report to developers.
Windows dialog also appears.
(venv) C:\njs\depthai>python depthai_demo.py
Using depthai module from: C:\njs\depthai\venv\lib\site-packages\depthai.cp39-win_amd64.pyd
Depthai version installed: 2.13.0.0
Setting up demo...
Available devices:
[0] 14442C10C1A1C6D200 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.SUPER
Stopping demo...
=== TOTAL FPS ===
[color]: 28.2
[nnInput]: 23.7
[depthRaw]: 24.9
[depth]: 24.9
[left]: 27.0
[rectifiedLeft]: 23.6
Setting up demo...
[right]: 26.4
Available devices:
[rectifiedRight]: 24.6
[nn]: 23.6
[0] 14442C10C1A1C6D200 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.SUPER
Downloading C:\Users\dale\.cache\blobconverter\face-detection-retail-0004_openvino_2021.4_12shave.blob...
[==================================================]
Done
[14442C10C1A1C6D200] [15.506] [SpatialDetectionNetwork(14)] [warning] Network compiled for 12 shaves, maximum available 13, compiling for 6 shaves likely will yield in better performance
[14442C10C1A1C6D200] [15.680] [system] [critical] Fatal error. Please report to developers. Log: 'ResourceLocker' '162'
Stopping demo...
=== TOTAL FPS ===
[color]: 30.5
[left]: 0.0
[right]: 0.0
File "C:\njs\depthai\depthai_demo.py", line 548, in run
self.instance.run_all(self.conf)
File "C:\njs\depthai\depthai_demo.py", line 61, in run_all
self.run()
File "C:\njs\depthai\depthai_demo.py", line 256, in run
self.loop()
File "C:\njs\depthai\depthai_demo.py", line 283, in loop
self._pv.prepareFrames(callback=self.onNewFrame)
File "c:\njs\depthai\depthai_sdk\src\depthai_sdk\managers\preview_manager.py", line 113, in prepareFrames
packet = queue.tryGet()
Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'color' (X_LINK_ERROR)'
Log
log_system_information.zip
Expected
No errors and 12 shaves being used.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Troubleshooting - DepthAI documentation - Luxonis
For USB OAK cameras, DepthAI can throw an error code like X_LINK_COMMUNICATION_NOT_OPEN or X_LINK_ERROR , which is usually a sign of a bad...
Read more >Profile for GitHub - Linknovate
I believe this article will interest developers trying to improve the interpreter performance of dynamic programming languages (e.g., CPython developers). I ...
Read more >depthai from luxonis - GithubHelp
depthai_ai.cmd not xlink success depthai: Error initalizing xlink; Traceback (most recent call last): File "test_cnn.py", line 43, in <module> nnet_packets, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
🤪What you said @alex-luxonis 😉
I have much to learn about the onboard capabilities of OAK: NN, hardware threads, shaves, etc. Not only the tech, but the “feel” of the tech. This demo py looks like an excellent place to experiment and learn – hence – me trying different shave counts to see how it affects NN fps, latency, or “feel”.
The demo GUI did caution me that it probably runs better with 6 shaves. 🙉
Is your fuzz testing in place? Randomly choosing config options and then run and see what breaks. Good opportunity for automation. a few rand(), a run(), and watch for smoke. 😂
The issue is not related to the above-mentioned number of threads, it’s an internal resource allocation issue in firmware when
setRuntimeModeSwitch
is enabled. Will issue a fix.