AE expired cached objects

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, robinmiller, kevinmiller, malte

Post Reply
scrabbles
Posts: 25
Joined: Sat Dec 20, 2014 4:32 am
Location: Melbourne, Australia

AE expired cached objects

Post by scrabbles » Thu Dec 24, 2015 9:18 am

Hi, sorry if this is silly question but I have a card that dynamically creates (on preOpenCard), animates (on openCard) and deletes (on closeCard) graphic objects. On the first run of aeChangeAngleCircular it works fine, but on subsequent runs (closing then re-opening card) it fails with "execution error Chunk: No such object" on the line:

Code: Select all

send "aeEnterFrame"  && "aeChangeAngleCircular" to pcontrol
It looks like it is trying to send those to objects that did exist on a previous run, but no longer do. It still adds the new grc objects to tAEEasingCircular though. However, I expect 2 objects in that array on each run, but it keeps the 2 from each previous execution.

I've worked around it by adding

Code: Select all

if not exists(pControl) then next repeat
before the above, but it of course doesn't prevent the old objects from accruing.

Am I missing something when i close the card while the animation is executing? i think that might be the root of the problem, is there a aeStopGeneral or similar i need to execute on card close?

The card executes aeChangeAngleCircular the long ID of grc .... in a handler titled "playEffect"

The closeCard handler is

Code: Select all

    repeat for each line q in the pendingMessages
        if item 3 of q is "playEffect" then
            cancel item 1 of q
        end if
    end repeat

    repeat with j = the number of graphics down to 1
        delete graphic j
    end repeat
thanks for any help

- Mark

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: AE expired cached objects

Post by malte » Sun Dec 27, 2015 1:21 pm

Hi Mark,

would you mind sending me a test stack to malte@derbrill.de? I could then take a look what is happening. It might be that the housekeeping in AE is not completely correct.

Thanks,

Malte

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: AE expired cached objects

Post by malte » Tue Dec 29, 2015 11:33 am

Hi Mark,

I sent you an updated version off list. If that works for you I will make it official. Just let me know.

Cheers,

Malte

scrabbles
Posts: 25
Joined: Sat Dec 20, 2014 4:32 am
Location: Melbourne, Australia

Re: AE expired cached objects

Post by scrabbles » Tue Dec 29, 2015 11:43 pm

Thank you very much Malte, I can confirm that the issue is no longer reproducible with the updated version.

- Mark

Post Reply

Return to “Animation Engine”