Error generated. /.../gstnvarguscamerasrc.cpp, execute:543 Failed to create CaptureSession

I’m encountering this error:

In another thread someone suggested running: nvgstcapture-1.0

This is the tail end of the output:

This issue started when the program I’m working on crashed. My guess is that the driver is hung. I’m wondering if there’s a way to reset the driver without rebooting, or if I have no other option than to reboot.

Does it a always failed problem or got failed sometimes?
What does the v4l2-ctl --list-devices show?

Hello oseberg,
This may happen if there is another session using this same camera (hung or alive) and try to use same camera again; if this issue is happening sometimes. You can close all sessions and reset the nvargus-daemon to reset the argus framework and try nvgstcapture-1.0 again.

sudo service nvargus-daemon restart

Thanks and Regards
Sarath S