Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #2

Open
Yoki-pjx opened this issue Jul 6, 2022 · 2 comments
Open

Segmentation fault #2

Yoki-pjx opened this issue Jul 6, 2022 · 2 comments

Comments

@Yoki-pjx
Copy link

Yoki-pjx commented Jul 6, 2022

Hi @Qengineering ,

Thank you for the fantastic codes. I am a fresh programmer learning the AI things on Raspberry Pi 4B.
My system is 'Linux raspberrypi 5.15.32-v8+ aarch64 GNU/Linux'

When I try to run the project file YoloFastestV2.cbp in Code::Blocks followed by your tutorial, I get the result 'Segmentation fault'. Could you please help to fix the problem? It might be a silly question, and I am sorry to request as I failed many times.
Segmentation fault
I am looking forward to your reply. Cheers.

@Qengineering
Copy link
Owner

Qengineering commented Jul 6, 2022

The segmentation fault is the most unspecified error you can get.
It can have many different causes. At a low level, it means your trying to read/write data to a memory location not owned by the application.
Try the narrow it down. You can see in the output that you start grabbing frames from the video. So far, so good.
Temporarily remove the following lines.

        std::vector<TargetBox> boxes;
        yoloF2.detection(frame, boxes);
        draw_objects(frame, boxes);

See if you get a working window playing the video.
If so, you know your error is somewhere inside those three lines.
Most likely, you have an error in your ncnn library.
For instance, you have compiled a 64-bit version of ncnn and you are using it on a 32-bit machine, or visa-versa.

@Yoki-pjx
Copy link
Author

Yoki-pjx commented Jul 8, 2022

Thank you for replying. I tried to remove the lines, but the errors still occurred. It might be some problem in my library as your extrapolation. I installed your RPi img instead, and it works. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants