Spinnaker: Not Enough available memory to allocate buffer for streaming

206 views Asked by At

Because of this error Spinnaker: Not Enough available memory to allocate buffer for streaming when trying to give the command to start the camera, I made the following code to try to deallocate the camera:

        system = PySpin.System.GetInstance()
        
        cont = 10
        while cont > 0:
            try:
                cam_list = system.GetCameras()
                cam = cam_list.GetByIndex(0)
                print(">1")
                cam.Init() #ERRO
                print(">2")
                break
            except Exception as e:
                print("e: ", str(e))
                
                if cam.IsInitialized(): # não entra nesse if
                    cam.DeInit()
                    print('deInit')
                    
                del cam
                del cam_list
                
                cont -= 1
     
        if cont > 0:    
            print("** Iniciou a camera **\n")
        else:
            print("** Não iniciou a camera **\n")
            return

But they go through the 10 attempts to clean the camera and then it does not start, I tried to increase it to 100 and then sometimes it passes, but there is no pattern, there is also no pattern for when this error occurs, on Friday we managed to do more than 60 photos with camera, then today when we run the second photo this error appeared.

Can anyone give us a light on how to solve it in a definitive way? I start to think it's hardware, some camera problem or something, but I don't know how to be sure it's hardware.

1

There are 1 answers

0
Merwanski On

You will have to increase the size of the memory allocated using the following command:

sudo gedit /sys/module/usbcore/parameters/usbfs_memory_mb

In the file that opens you should have the value "16"

Change it to "1000" (without the "), save your file et voila

source