Copy link to clipboard
Copied
I am currently developing a fully reactive pie chart with a variety of elements and dynamic animation triggering for use as a motion graphics template. The project has several subcomps and is chock full of expressions but works fine in AE and renders without any problems. However:
When trying to export the project as a motion graphic template via the essential graphics panel, AE freezes and eventually crashes.
It does not matter what export method/destination I choose (tried them all). As soon as I confirm the export the window freezes up and nothing happens, even after an hour, sometimes the app crashes after a while.
Other, more simple projects export just fine, so I am fairly certain the problem is with my project.
I have well over a hundred elements exposed to the user via the essential graphics panel (there are up to 8 slices with individual labels and other parameters, so it adds up quick). I have already had a bug while building the menu where AE crashed when adding more items, but that was fixed after a restart.
I have considered the project architecture/expression use as the culprit as well. The slices on the chart are all chained via expressionns to calculate their sizes and positions. I have never had problems with that before though.
The most outlandish expressions I use loop through the comp frames to detect when a threshold value is crossed to dsynamically trigger the individual labels to fade in. However, since there are no issues in AE itself and it renders fine I am not sure if this is the issue.
I create a variety of motion graphics templates for my organization and have succesfully deployed a range of relatively complex tempalte files so far, so I am not new to the workflow, but this has me stumped. I tried the usual troubleshooting methods (updating, checking drivers etc., trying to remove suspicious elements, move to a new project file etc.).RAM and CPU/GPU usage are nominal before and during export and remain constant after the program locks up.
System specs are below. Thanks in advance for any help!
System Specs:
AE Version: 17.1.3
OS: Win 10 Pro
GPU Drivers: Nvidia Studio drivers
CPU: Ryzen 3750X
GPU: RTX2070S
RAM: 32GB DDR4 @ 4000MHZ
Storage: HDD Raid 10 (internal)
Cache: 500GB M.2 SSD
In addition to Mylenium, replace the while-loop with a for-loop and give it a try:
for ( i = frame; i >= 0; i--){
// you can skip "if (frame == 0){...}" and "frame --"
}
*Martin
Copy link to clipboard
Copied
This doesn't look like a very complex MoGRT such that it'll freeze/crash AE.
And your description of looping the Comp to test for a value doesn't sound like an efficient way to trigger an animation – look at an alternative algorithm to trigger the animation.
And if all fails, send in a Bug Report and ensure you add your project file to the report.
Copy link to clipboard
Copied
Thanks for your input. I have considered other algorithms and will replace the while loop with a for loop as per the feedback below. The problem is that since the animation start time for each label element is dependent on it's spatial position as well as the number of and position of elements before it I can't just evenly divide the timings between the elements. I might be able to come up with a time division script based on the slide percentages though... it's just much simpler to just check for a threshold transition instead, which is something that has been done by others succesfully.
What most confuses me is that the project works fine except when trying to export as a mogrt.
Copy link to clipboard
Copied
while() loops are dangerous in AE, 'cause they can effectively cause the expression engine to never stop evaluating. Presumably that's what's causing the freeze - the project is still in a locked state due to some calculation going on somewhere. I can only second Roland's point - figure out a different method to determine your triggers.
Mylenium
Copy link to clipboard
Copied
In addition to Mylenium, replace the while-loop with a for-loop and give it a try:
for ( i = frame; i >= 0; i--){
// you can skip "if (frame == 0){...}" and "frame --"
}
*Martin
Copy link to clipboard
Copied
I'll certainly give replacing the trigger script a try. However I don't really see how that could be it as, again, the project works just fine for general use on multiple machines, it just doesn't export as a mogrt for some reason. I'll report back after trying though, thanks for your time!
Copy link to clipboard
Copied
Thanks for your input! I am pretty sure the script exits as intended when the transition point is found. If there is no transition the script will get stuck in a loop however, that's a great point. You are anyways right that while loops are poor practice, so I will try replacing the script.
What puzzles me is that the project works just fine otherwise, the freeze only occurs when trying to package it as a motion graphics template.