Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Stack Overrun in expression

  • Stack Overrun in expression

    Posted by Julian Kauffmann on January 8, 2015 at 8:55 pm

    I wrote a script that copies certain layers into a new composition. It then generates expressions for the new layers properties (transform properties, puppet points and time remap) dynamically linking them to the old layers.

    The script works fine and returns no errors. However after running it “After Effects” gives me the following error for some of the newly created expressions:

    “After Effects warning: stack overrun
    expression disabled
    error occurred at line 0”

    It will then disable those expressions. Again, just some of them. Now, the expression itself is fine because I can just go into the new composition and click on the “=” to reenable them and I get no error.

    The strange thing is, though, that if I run this same script with the caps lock I don’t get any error at all. (Also, strangely, at the end of the script it gives an alert to let you know how many layers were duplicated, and if I turn off this alert I don’t get an error either.)

    This script is for a client so I can’t tell them just make sure you have your caps lock on. Does anybody know what might be causing this?

    Dan Ebberts replied 11 years, 4 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    January 8, 2015 at 9:24 pm

    I really don’t have any specific knowledge of what’s going on under the hood, but my hunch is that you may have a lot of layers with expressions possibly referring to other expressions so that AE needs a lot of stack space to calculate everything. Other things going on at the same time (script, frame render, ?) may be competing for the same space, which could make it behave differently, depending on other conditions. You might want to look at your expressions to see if you can eliminate some dependencies on other expressions. Again, this is all speculation on my part.

    Dan

  • Julian Kauffmann

    January 8, 2015 at 9:51 pm

    Thanks Dan,

    It’s strange though that running it with the caps lock on would prevent this error. Turning the caps lock off after it runs gives me no errors.

    I may have fixed it however, though I don’t understand why. As I said before the script makes a new composition and then adds it into the main composition. It then copies layers into this newly created composition and adds expression. The thing I changed is that I now have the script collapsing this new composition. For some reason I’m not getting the error anymore. I’m cautiously optimistic.

    I should say that I’m working on cs6 which I have found to be buggy.

    -Julian

  • Julian Kauffmann

    January 9, 2015 at 12:08 am

    I guess I was overly optimistic. I got the error again.

  • Julian Kauffmann

    January 9, 2015 at 12:34 am

    I believe you were right, Dan. A few expressions got the “overrun” error that were on layers no even being copied over. So I assume they were trying to recalibrate due to the new information which was overloading AE memory. I’m on an older computer. If I was using a computer with more memory would that help? Forgive me if that is a stupid question. Thanks, Julian

  • Julian Kauffmann

    January 9, 2015 at 12:40 am

    Sorry, one more question. The script is doing a lot of operations. Is it possible that since I have the entire operation under one undoGroup that I’m bogging AE down. And if I were to divide the operation into several undoGroups it might free up memory?

  • Dan Ebberts

    January 9, 2015 at 12:59 am

    I don’t know how AE’s memory allocation works, but I have wondered what impact a huge undo group could have. I would temporarily comment out the undo group and see if it makes a difference.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy