Segmentation Fault (Core Dumped) Error When Using USB Camera on Jetson Nano.

Yi don't know Kung Fu
2 min readJun 25, 2021

Problem

I bought a USB camera and plugged it into my Jetson Nano. When I tried to use cheese and camorama, following errors occurred.

Solution

There are two errors. One is "Failed to load module "canberra-gtk-module", another one is "Segmentation fault (core dumped)".

To solve “Failed to load module “canberra-gtk-module”, simply run the following command.

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

Error “Segmentation fault (core dumped)” is a bit more complex. This error means that you are trying to assess a piece of memory that you can't access to.

I solved this error by replacing file /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so with a file downloaded from NVIDIA Developer Forums. For more information about this file, go to https://forums.developer.nvidia.com/t/libv4l2-nvargus-so-source-code/168303

  1. In Jetson Nano, download the file from this link

https://forums.developer.nvidia.com/uploads/short-url/4L6p6Cir0SN8YTDMy1z8vrgU6oF.zip

2. If you have never set a password for root. Run following command to set one.

sudo passwd

3. Follow the guide to set your password for root.

4. Open terminal. Enter the system as root by running following command.

su root

5. Move the file /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so to the Documents folder and keep it, so that in the future if something goes wrong, you can always restore this file. The path of Documents fold for me is /home/yi/Documents/, remember to change this path into your own path.

mv /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so /home/yi/Documents/

6. Move the downloaded file into /usr/lib/aarch64-linux-gnu/tegra folder and rename it to libv4l2_nvargus.so . The path for me is /home/yi/Downloads/Topic168303_Apr21_libv4l2_nvargus.so, remember to change this path into your own path.

mv /home/yi/Downloads/Topic168303_Apr21_libv4l2_nvargus.so /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so

7. All set ! Try cheese or camorama in terminal and Segmentation fault (core dumped) Error should be disappeared.

Try cheese or camorama
A selfie of Jetson Nano.

If the error is still there or something strange happens, restore the origin libv4l2_nvargus.so file by replacing the file libv4l2_nvargus.so in /usr/lib/aarch64-linux-gnu/tegra with the origin libv4l2_nvargus.so file that we moved to the Documents previously.

If you have any questions or suggestions, feel free to contact me. My email address: yzhong506@gmail.com

--

--