std::bad_alloc error after software update

Hello,

I updated the Hailo firmware on my raspberry Pi from 4.19 to 4.20, however now I’m getting the following error:


"terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
 Aborted"

I updated the software following the instructions from here:
Hailo update

Here is the output of the “hailortcli fw-control identify” command:


Executing on device: 0001:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: 
Part Number: 
Product Name: 

I’m getting the error when I try to run the examples from the Hailo-RPI5-examples with or without the rpi camera. The examples were running fine before I updated to 4.20. One interesting thing, it’s that the Whisper model works Whisper model. Before, it wasn’t working as it requires 4.20.

I would appreciate any suggestions or guidance.

Thanks

Hey @robot_ai ,

Checking in , is this still an issue ?

Hey @omria,

Yes, I couldn’t manage to fix the issue. I suspect the problem might be related to the kernel version, it might have gotten upgraded after running:

sudo apt full-upgrade

I played around doing a fresh install using another SD card. If you have any suggestions, let me know. I can try and share the results.

Hey there,

For now, go ahead and downgrade your kernel version. I’ll keep you posted when we have a proper fix ready.

Here’s the link with the details: Raspberry Pi Kernel Compatibility Issue - Temporary Fix

Hey,

Thanks. I have an update:

  1. In my old SD card - the one that I upgraded from 4.19 to 4.20:
    I had the 6.12.25 kernel version. I was able to downgrade the kernel version to 6.12.20. I purged the old hailo packages and re-install them:
sudo dpkg --purge hailort hailo-all python3-hailort rpicam-apps-hailo-postprocess
sudo apt install hailo-all

However, I’m still getting the same error:

Picamera2 configuration: width=1280, height=720, format=RGB
picamera_process started
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted
  1. In my new SD card:

This one has a fresh install. I checked the kernel version and it’s 6.12.25+rpt-rpi-2712. Everything works without any issues.

1 Like

This is interesting—thanks for the information about the old SD card!

Question, in the kernel 6.12.25 you have stability for hours?

Hey,

  1. Old SD card
    I’d like to downgrade my old SD card to 6.6.7x

  2. New SD card:
    I did a test for 3 hours running this example python basic_pipelines/detection.py --input rpi. I didn’t have any issues. Here some details of my current setup:

uname -r

6.12.25+rpt-rpi-2712

and

hailortcli fw-control identify

Executing on device: 0001:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: <N/A>
Part Number: <N/A>
Product Name: <N/A>

Please let me know if you have any additional questions or would like me to perform any additional tests.

1 Like

Hey ,

Great job on this, really appreciate it! Just one last question - were you able to get the old SD card downgraded to version 6.6.7?

Also, I was wondering if the example you showed works with both USB input and video input?

Thanks again!

1 Like

Hey,

Thanks! I have some updates:

  1. Old SD card:

I finally was able to downgrade the kernel version by using the following command sudo rpi-update 192d8e0b9d. However, I’m still getting the same error - std::bad_alloc. Here is some info:

uname -r
6.6.78-v8-16k+
Control Protocol Version: 2
Firmware Version: 4.20.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L

Any suggestions?

  1. On my new SD card:

I tested for 3 h using my Raspberry Pi camera for video input. Unfortunately, I don’t have a USB camera for testing :frowning: . Let me know if you want me to run any other tests with the Raspberry Pi camera.

Hey ,

Thanks for the update , we will release a fix soon !