Openframeworks: videoGrabberExample -> error -> Finalizing CVPixelBuffer 0x6180001217c0 while lock count is 1.

Created on 5 Oct 2017  路  1Comment  路  Source: openframeworks/openFrameworks

I am on macOS 10.12.6 with OF 0.10.0.
When running the videoGrabberExample example at 1920x1080 cam resolution I get the following print out in the console.
The same Logitech c920 at 320x240 does not give this message. I get the same result on a Logitech Brio and other usb cameras.

tried it with of_v20170714_osx_nightly.zip

Finalizing CVPixelBuffer 0x600000121720 while lock count is 1.
Finalizing CVPixelBuffer 0x600000121400 while lock count is 1.
Finalizing CVPixelBuffer 0x608000120dc0 while lock count is 1.
Finalizing CVPixelBuffer 0x608000120b40 while lock count is 1.
Finalizing CVPixelBuffer 0x610000121360 while lock count is 1.
Finalizing CVPixelBuffer 0x6180001217c0 while lock count is 1.
Finalizing CVPixelBuffer 0x600000121720 while lock count is 1.
Finalizing CVPixelBuffer 0x618000120780 while lock count is 1.
Finalizing CVPixelBuffer 0x6180001206e0 while lock count is 1.
Finalizing CVPixelBuffer 0x6080001205a0 while lock count is 1.
Finalizing CVPixelBuffer 0x6180001214a0 while lock count is 1.

and many more

Most helpful comment

I've seen this same issue on OSX 10.12.6 with oF 0.9.8 with a webcam only when running at 1920x1080 as well.

I found this StackOverflow post which talks about having to unlock the buffer after locking it. And after some digging, I found that _ofAVFoundationGrabber.mm_ has a call to CVPixelBufferLockBaseAddress(imageBuffer,0); without a matching unlock call. By placing a call to CVPixelBufferUnlockBaseAddress(imageBuffer, kCVPixelBufferLock_ReadOnly); on line 323 of _ofAVFoundationGrabber.mm_ I have suppressed that same warning. I'm not sure if that is actually fixing the issue, or if it's just suppressing the warning.

Also, hey Stephan! I hope things are well.

>All comments

I've seen this same issue on OSX 10.12.6 with oF 0.9.8 with a webcam only when running at 1920x1080 as well.

I found this StackOverflow post which talks about having to unlock the buffer after locking it. And after some digging, I found that _ofAVFoundationGrabber.mm_ has a call to CVPixelBufferLockBaseAddress(imageBuffer,0); without a matching unlock call. By placing a call to CVPixelBufferUnlockBaseAddress(imageBuffer, kCVPixelBufferLock_ReadOnly); on line 323 of _ofAVFoundationGrabber.mm_ I have suppressed that same warning. I'm not sure if that is actually fixing the issue, or if it's just suppressing the warning.

Also, hey Stephan! I hope things are well.

Was this page helpful?
0 / 5 - 0 ratings