Segmentation fault while running examples with USB camera

I am trying to run ./detectnet-camera --camera /dev/video0 and camera-viewer /dev/video0 examples and running into a segmentation fault. I do have a screenshot of the log, but I am not sure how to post it in this topic. The log is very similar to what is mentioned in this thread:

and the difference is that I have already tried providing the camera input as /dev/video0 which is the correct video source.

Another difference in the log is:

[gStreamer] opening gstCamera for streaming, transitioning pipeline to GST_STAT_PLAYING

The other statements in log are similar to the one shown in the link. It ends as follows:

camera-viewer: camera open for streaming
GST_ARGUS: Creating output stream
CONSUMER:Waiting until producer is connected …
GST_ARGUS: Available sensor modes:
Segmentation fault (core-dumped)

Kindly suggest if any other debugging steps are required.

The error shows it opens the source as Argus camera source. Your source is USB camera and you should specify it as v4l2 source in command line.

How do I specify it as a v4l2 source. This is the way I have already tried out:

./detectnet-camera --camera /dev/video0

I am using Logitech C170. Is it because this model is unsupported?

The example is

$ ./detectnet-camera <b>--camera=/dev/video0</b>

You probably miss ‘=’.

That was a typo when I posted it. I have tried the same command as you have posted.

Now when I run this command, I notice that jetson freezes. Following is the log towards the end:

[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> v4l2src0
[gstreamer] gstreamer msg stream start ==> pipeline0
[gstreamer] gstCamera onEOS
[gstreamer] gstreamer v4l2src0 ERROR Internal data stream error.
[gstreamer] gstreamer Debugging info:gstbasesrc.c(3055):gst_base_src_loop ():
streaming stopped, reason not negotiated (-4)
[gstreamer] gstreamer changed state from READY to PAUSED ==>mysink
detectnet-camera: camera open for streaming

After this the terminal is stuck and I have to kill the process

Inow tried with Logitech C920 camera which is mentioned in the list of supported cameras and it is working

Please check if you can launch C170 by following the steps:
The pipeline of launching USB camera(v4l2src) is

		ss << "v4l2src device=" << mCameraStr << " ! ";
		ss << "video/x-raw, width=(int)" << mWidth << ", height=(int)" << mHeight << ", "; 
		ss << "format=YUY2 ! videoconvert ! video/x-raw, format=RGB ! videoconvert !";
		ss << "format=RGB ! videoconvert ! video/x-raw, format=RGB ! videoconvert !";

		ss << "appsink name=mysink";

		mSource = GST_SOURCE_V4L2;

For C170, probably the pipeline have to be customized. You may try to modify format, width, height and check again.