Argus CaptureSession hangs on destruction when error occurs

Hi all,

Whenever an error occurs with processing frames during a CaptureSession, it stalls when it is being destructed.

I reproduced this problem by building the argus_userautoexposure sample and adding a timeout to the acquireFrame function: UniqueObj<Frame> frame(iFrameConsumer->acquireFrame(1000000000)); I then disconnected the sensor and ran the sample. It will hang on the destruction of the Argus::CaptureSession UniqueObj.

(gdb) bt
#0  futex_abstimed_wait_cancelable (private=0, abstime=0xffffffffecf8, clockid=<optimized out>, 
    expected=0, futex_word=0xfffff0000f78) at ../sysdeps/nptl/futex-internal.h:320
#1  __pthread_cond_wait_common (abstime=0xffffffffecf8, clockid=<optimized out>, 
    mutex=0xaaaaaab0f9e0, cond=0xfffff0000f50) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0xfffff0000f50, mutex=0xaaaaaab0f9e0, abstime=0xffffffffecf8)
    at pthread_cond_wait.c:665
#3  0x0000fffff71a8fcc in NvOsConditionWaitTimeout ()
   from /usr/lib/aarch64-linux-gnu/tegra/libnvos.so
#4  0x0000fffff7271104 in nvcamerautils::ConditionVariable::wait(nvcamerautils::Mutex const&, nvcamerautils::UnscaledTimeout const&) const () from /usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so
#5  0x0000fffff7f15bc0 in ?? () from /usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so
#6  0x0000fffff7f18aa4 in ?? () from /usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so
#7  0x0000fffff7e7979c in ?? () from /usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so
#8  0x0000aaaaaaabc434 in Argus::UniqueObj<Argus::CaptureSession>::reset (this=0xffffffffef28, 
    obj=0x0) at /usr/src/jetson_multimedia_api/argus/include/Argus/Types.h:471
#9  0x0000aaaaaaabb790 in Argus::UniqueObj<Argus::CaptureSession>::~UniqueObj (this=0xffffffffef28, 
    __in_chrg=<optimized out>) at /usr/src/jetson_multimedia_api/argus/include/Argus/Types.h:478
#10 0x0000aaaaaaab7718 in ArgusSamples::execute (options=...)
    at /usr/src/jetson_multimedia_api/argus/samples/userAutoExposure/main.cpp:176
#11 0x0000aaaaaaab7884 in main (argc=1, argv=0xfffffffff488)
    at /usr/src/jetson_multimedia_api/argus/samples/userAutoExposure/main.cpp:541

I’m expecting it to throw an error and then shutdown, instead of hanging. Any advice would be appreciated!

Thanks in advance

Suppose the error handle is the error after the streaming start.
For your case maybe return failed by the sensor driver open() or power_on() function.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.