I am currently working on a relatively big project with lots of expressions. Unfortionately AE throws spontaneously an exception called "uncaught exception error [...]" and disables the corresponding slider expression, which messes up the project.
So far it has always been a sourceRectAtTime() expression causing the exception, but I can't figure out why (I have a good pc i7 7700k 32gb ram). The project is supposed to be a template, so i really need to fix this this instability.
Question Would adding a try-catch statements to each "critical" expression solve this issue? The Goal is that the slider of these layers won't get disabled. Would I lose much performance if I added a lot of try-catch blocks?
And are there any "secret tricks" to increase performance with expressions? I already figuered out to restrict expensive expressions, which return always the same values, to only one call.
Tricky question. try/catch should trap most errors, but it won't catch everything. It depends on what's going on with your specific expression. Also, if there is an error, the catch part needs to provide an acceptable result for the expression, so the slider probably won't work the way you need it to and it won't be obvious why. It would be better to fix the expression.
I have about 20 different text layers, each are in a seperate comp. All comps have a null object with some sliders that get properties from the text, like width and height.
Half of the sliders are called "full_text_width" and use the following simple expression:
And when I try to change the text, then there is the chance that i get an uknown exception, caused by a slider with sourceRectAtTime(). But I can simply go in that that comp and enable the expression again and everything works.So that's really weird, I cannot spot the mistake.
I know that you can use sourceRectAtTime() with 2 arguments, but i don't really know what the second one stands for and if it's related to my problem at all.