Re: malloc error when repeatedly calling getInputBitmap in an FxPlug plug-in on FCP
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Hi, Ben, - Paul On Dec 4, 2007, at 11:44 AM, Benjamin Kent wrote: Hi, Thanks Ben _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... unfortunately, this is a bug in Final Cut. You're not doing anything wrong. We don't free the memory allocated by -getInputBitmap when the bitmap is released; instead, we wait until the call to - renderOutput returns. The result is that if you retrieve many input bitmaps during a single render call, you can run out of memory. We're aware of the problem and hope to fix in in a future update. Until then, I think you'll have to accumulate analysis data as you render frames, rather than doing everything in one pass, if that's possible. Adding the following code into the renderOutput section of the SimpleMatte sdk plug-in: double theTime; for(theTime=0; theTime<900; theTime+=0.5f) { FxBitmap * theBitmap = NULL; [getAPI getInputBitmap:&theBitmap withInfo:renderInfo atTime:theTime]; [theBitmap release]; } gives a malloc error in the console of the form: Final Cut Pro(21811,0xa000d000) malloc: *** vm_allocate (size=6234112) failed (error code=3) Final Cut Pro(21811,0xa000d000) malloc: *** error: can't allocate region Final Cut Pro(21811,0xa000d000) malloc: *** set a breakpoint in szone_error to debug Am I failing to free some memory, or is there an internal issue in FCP? It appears to only give this error when applied to an actual imported clip (as opposed to one created by a generator effect). In case you're wondering why any such code should exist, I need to do an analysis pass through the sequence in one plug-in. _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/pschneider% 40apple.com This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Paul Schneider