Re: FCP Out of memory error
Re: FCP Out of memory error
- Subject: Re: FCP Out of memory error
- From: Peter Litwinowicz <email@hidden>
- Date: Thu, 10 Feb 2011 14:57:06 -0800
- Thread-topic: FCP Out of memory error
Good time for me to step in here..
It would be REALLY REALLY REALLY be useful if the memory I allocate for my
plugins are coordinated through FxPlug memory functions (instead of malloc).
Our users run out of memory all the time. And not because there isn't
memory, but because FCP doesn't seem to release some of it's cached images
(or other memory) when we request memory via malloc.
This is becoming more and more of a really big problem for us. Our plugins
routinely run out of memory because there is no coordination between FCP
allocated memory and ours.
I know I sound like a broken record (first asked for this 4+ years ago :-)
).
Pete
On 2/10/11 9:31 AM, "Darrin Cardani" <email@hidden> wrote:
> Setting the undo to 50 would not normally cause this to happen. The most
> likely cause is that your plug-in is allocating something and not freeing it
> on every render, or every user action, if you've got a custom UI control.
>
> Changes to custom UI will go on the undo stack, so if you have a huge amount
> of custom data (like 10's or 100's of Megs), it could potentially cause this
> with an undo level of 50. It will also likely slow down your plug-in, even if
> the machine doesn't run out of memory.
>
> You can usually find out where such a leak is coming from by using
> Instruments. If you open your project in Xcode, open the "Run" menu, then open
> the "Run with Performance Tool" submenu, and choose "Leaks" it will start FCP
> running under Instruments and let you see if there are any leaks. If so, you
> can click on a specific leak and see the call stack for it, which should tell
> you exactly where in your code you're allocating the memory. You then will
> need to figure out the appropriate place to free it.
>
> Some common things that developers forget to release are:
>
> 1) Any memory allocated using malloc, new, [alloc], or any Objective-C method
> or Core Foundation function that starts with Copy or Create (common things
> include CFStrings/NSStrings, CFData/NSData, memory buffers for intermediate
> processing, etc.)
> 2) Any images from image well parameters or the temporal API (e.g.
> -getBitmap:::: or -getTexture:::)
> 3) Various objects from other parts of the OS, such as Core Graphics,
> QuickTime, etc. (Things like CGColorSpaceRefs, CGContexts, etc.)
>
> Darrin
>
> On Feb 10, 2011, at 3:43 AM, Brian F. Summa wrote:
>
>> I'm writing my first Fxplug for FCP and keep running into an out of memory
>> error on one machine. I can recreate the error by setting the levels of undo
>> in FCP to 50.
>>
>> Is this just a coincidence or can setting the levels of undo too high cause
>> an out of memory error? Just want to make sure I'm barking up the right tree.
>>
>> Brian
>>
>> Sent from my iPhone
>>
>> "Don't text and drive." _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Pro-apps-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Darrin Cardani
> email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Pro-apps-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden