Segmentation fault on Hailo8L using raspberrypi5 with rpi cam

Hi @kirank,

Welcome to the Hailo Community!

I’d like to clarify that the project you’re asking about isn’t an official Hailo project, but a community-driven one. It would be best to ask your question in the same topic where the project was originally published.

That being said, I can offer some general advice about the segmentation fault you’re experiencing with YOLOv8 on Hailo 8L and Raspberry Pi 5. This error often points to memory issues or hardware interaction problems. Here are some troubleshooting steps:

  1. Check for memory leaks using Valgrind:

    sudo apt-get install valgrind
    valgrind python3 your_script.py
    
  2. Ensure proper Hailo-8L integration:

    • Restart camera services:
      sudo systemctl restart libcamera-daemon
      
  3. Monitor resource usage with htop or top during runtime.

  4. Try lowering the input frame rate or resolution.

In your Python code, handle exceptions properly:

try:
    while True:
        # Your detection logic
except Exception as e:
    print(f"Error: {e}")
    cleanup_resources()  # Ensure hardware resources are properly released

If the problem continues, try running simpler parts of your pipeline separately (e.g., camera-only or inference-only) to isolate the issue.

I recommend using the official examples as a baseline since they perform similar tasks. They should provide a good starting point for your project.

Let us know how it goes or if you need further assistance!