ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Stack Overrun in expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Julian Kauffmann
Stack Overrun in expression
on Jan 8, 2015 at 8:55:04 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?


Return to posts index

Dan Ebberts
Re: Stack Overrun in expression
on Jan 8, 2015 at 9:24:34 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



Return to posts index

Julian Kauffmann
Re: Stack Overrun in expression
on Jan 8, 2015 at 9:51:39 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


Return to posts index


Julian Kauffmann
Re: Stack Overrun in expression
on Jan 9, 2015 at 12:08:13 am

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


Return to posts index

Julian Kauffmann
Re: Stack Overrun in expression
on Jan 9, 2015 at 12:34:39 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


Return to posts index

Julian Kauffmann
Re: Stack Overrun in expression
on Jan 9, 2015 at 12:40:46 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?


Return to posts index


Dan Ebberts
Re: Stack Overrun in expression
on Jan 9, 2015 at 12:59:10 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



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]