depthai-core
depthai-core copied to clipboard
[system] [critical] Fatal error. Please report to developers. Log: 'ImgPreproc' '261'
While exploring actual behavior of node::ColorCamera, and node::ImageManip, depthai-core had a critical error
[14442C10C1A1C6D200] [259.567] [system] [critical] Fatal error. Please report to developers. Log: 'ImgPreproc' '261'
Random guess: It might be related to negative (or outside source image uv min/max) crop coordinates sent via ImageManipConfig::setCropRect()
.
Setup
- Microsoft Windows [Version 10.0.19044.1526]
- python 3.9.5, depthai for python 2.14.1.0
Repro
- do python depthai setupp
- write script that detects a person using a NN via the color camera.
- enhance script to crop color camera feed into NN based on previous location of person using ImgManip node
- use
cfg.setCropRect()
for the crop
Result
Script runs ok when person stands center of image, but crashes when person moves to edges of camera view
[14442C10C1A1C6D200] [12.513] [Script(5)] [warning] -166 -140 273 299
[14442C10C1A1C6D200] [12.553] [Script(5)] [warning] 0 -252 1151 899
[14442C10C1A1C6D200] [12.598] [Script(5)] [warning] 0 -252 1151 899
[14442C10C1A1C6D200] [12.641] [Script(5)] [warning] 14 -44 191 133
[14442C10C1A1C6D200] [12.642] [ImageManip(2)] [error] Processing failed, potentially unsupported config
[14442C10C1A1C6D200] [12.680] [Script(5)] [warning] -13 -27 54 40
[14442C10C1A1C6D200] [12.720] [Script(5)] [warning] -13 -15 -2 -4
[14442C10C1A1C6D200] [12.721] [system] [critical] Fatal error. Please report to developers. Log: 'ImgPreproc' '261'
...
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'manip_out' (X_LINK_ERROR)'
Expected
No fatal errors. If a bad param goes to a node, it should report a param validation error, and continue running. No crash.
Notes
Sometimes I will also get non-fatal errors. Here is the script showing the param values with node.warn()
and then calling cfg.setCropRect()
, and later sending the cfg to the ImgManip node. You can see some of the coordinates are negative and generate no warnings, while other times negative coordinates generate non-fatal errors. And then as above sometimes is fatal.
[14442C10C1A1C6D200] [67.324] [Script(5)] [warning] 0 -252 1151 899
[14442C10C1A1C6D200] [67.365] [Script(5)] [warning] 0 -252 1151 899
[14442C10C1A1C6D200] [67.405] [Script(5)] [warning] 18 -183 1165 964
[14442C10C1A1C6D200] [67.406] [ImageManip(2)] [error] Processing failed, potentially unsupported config
[14442C10C1A1C6D200] [67.445] [Script(5)] [warning] 0 -252 1151 899
[14442C10C1A1C6D200] [67.485] [Script(5)] [warning] 29 -177 1148 942
[14442C10C1A1C6D200] [67.486] [ImageManip(2)] [error] Processing failed, potentially unsupported config
[14442C10C1A1C6D200] [67.524] [Script(5)] [warning] 41 -115 1172 1016
Random guess: It might be related to negative (or outside source image uv min/max) crop coordinates sent via ImageManipConfig::setCropRect().
I think in existing impl thats the case.
Can you try with image_manip_refactor
branch? It improves many aspects, but there are a couple of extra things we need to do before mainlining it.
I'll assign this issue to the PR for the image_manip_refactor branch
😶 I don't have the knowledge to use image_manip_refactor
with the OP repro steps. That seems to be a depthai-core branch.
The repro is via python so I somehow need a python requirements file that I can use which has this branch you want me to try.
@diablodale there is also a image_manip_refactor
branch for Python over at depthai-python
Simplest is to install the prebuilt wheel using the following script in that repository: examples/install_requirements.py
Make sure you clone the repository and not just download it as it looks up the commit when installing the wheel of a specific branch/commit.
Let me know how it goes