depthai icon indicating copy to clipboard operation
depthai copied to clipboard

[BUG] Fatal error when setting manual ISO on OAK-D-Lite

Open domef opened this issue 3 years ago • 2 comments

Describe the bug When setting manual ISO with very small or very big values, a fatal error is thrown.

Minimal Reproducible Example

import cv2
import depthai as dai


pipeline = dai.Pipeline()
camera = pipeline.create(dai.node.ColorCamera)
camera.initialControl.setManualExposure(10000, 10000)
link = pipeline.createXLinkOut()
link.setStreamName("rgb")
link.input.setBlocking(False)
camera.video.link(link.input)
device = dai.Device(pipeline, usb2Mode=False)
queue = device.getOutputQueue(name="rgb", maxSize=10, blocking=False)
while True:
    image_raw = queue.get()
    image = image_raw.getCvFrame()
    cv2.namedWindow("image", cv2.WINDOW_NORMAL)
    cv2.imshow("image", image)
    c = cv2.waitKey(1)
    if c == ord("q"):
        break

This is the stacktrace:

[18443010C1818F0E00] [1.1] [0.903] [system] [critical] Fatal error. Please report to developers. Log: 'PlgSrcCtrl' '87'
Traceback (most recent call last):
  File "program.py", line 15, in <module>
    image_raw = queue.get()
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'rgb' (X_LINK_ERROR)'

Expected behavior The device shouldn't raise a critical error, maybe it could just clip the ISO value and raise a warning.

Additional context Depthai version: 2.20.0.0 Python version: 3.8.10 OS: Ubuntu 20.04.5 LTS Device: Oak-D-Lite

domef avatar Jan 24 '23 11:01 domef

I'm having the same issue too...

bolopenguin avatar Jan 25 '23 10:01 bolopenguin

Thank you for reporting. I can reproduce. I suggest your application ensures that it sends valid Exposure >0 and ISO [100;1600] values. The depthai library could handle it as you are suggesting, but as it can be easily handled by the programmer I dont think this will be resolved soon @bolopenguin and @domef

PetrNovota avatar Mar 30 '23 19:03 PetrNovota