Issue:
- Buffer insufficient issue when the program operate it with multiple cameras.


Solution:

Sometimes a user will get an error stating "insufficient Resources" when programming with pylon.

- For FireWire cameras, this typically is caused but not having enough bandwidth on the bus available (ie: setting two cameras each to 4096 Bytes Per packet on a single firewire A bus).

- For GigE cameras, this error is thrown when the operating system cannot supply a large enough block of contiguous memory to accommodate the amount of buffers requested by the programmer. For example, it is very common that even on systems with 1-2GB of memory, only 100-200 MB is readily available as a single contiguous block (most times memory is available in different addresses, not sequential, or contiguous, addresses).

Pylon will require contiguous memory for image buffers for good performance.

Therefore it is common that a user will run out of contiguous memory when requesting many buffers. The exact amount of contiguous memory is always unknown, and the buffer size always depends on the image size, so it is impossible to predict when this limit will be hit.

This problem is commonly found when users attempt to write recording software with pylon. It's common that one will try to create & register say 100 buffers for a 1 second recording from a 100fps camera. The common intention is to fill 100 buffers with recorded images, then dump them to disk. Without enough contiguous memory to register these 100 buffers, the user will get this Insufficient Resources error at runtime.

You will get the same error code "0x800705AA" if you are using Windows 7, 32 bit with several GigE-cameras. The reason for this error code is already described, 32 bit OS cannot supply large enough block of continous memory. One solution is to update the OS to 64 bit if possible. The 64 bit OS supply large enough block of continous memory. The other solution to this problem is to create the amount of buffers that is needed, but only register a few at a time with the streamgrabber. This is also known as a 'ringbuffer' method.

A pylon sample using the older (low level) api is attached here. For those using the new (v3.2+) api, it is reccomended not to set the MaxNumBuffer parameter manually. Rather the user should allow pylon to manage the buffers 'under the hood.'

aka: Failed to attach buffer: Insufficient system resources exist to complete the requested service. (0x800705AA)

Created By:
Matthew Breit, 29/08/2013 08:34