Issue:
- When I de-register the buffers, sometimes s/w crashes.


For example, I register 4 buffers for external trigger, but triggered only once or not not triggered at all.
Then I call DeregisterBuffer() and streamGrabber.FinishGrab(). s/w crashes.


I have below two questions:
1. Do you have any hint of under what situation DeregisterBuffer() procedure will crash?
2. Since we already use our own image buffer, what will happen if I don't de-register buffers? 


Solution:


1. Do you have any hint of under what situation DeregisterBuffer() procedure will crash?

If the buffer is queued and try to de-register, then there is possibility of crashing the buffer. So you can move the buffer from input queue to output queue by calling CancelGrab(). Then you may DeRegisterBuffer.

2. Since we already use our own image buffer, what will happen if I don't de-register buffers?

The buffer registration mechanism restricts the ownership of the buffers. Although the content of registered buffers can be changed by the user application, the application must not delete the memory of buffers that are registered. Freeing the memory is not allowed until the buffers are deregistered by using IStreamGrabber::DeregisterBuffer()