Skip to main content
Participant
Sep 28, 2022 9:38 AM UTC
Needs More Info

[Bug Report] Adding sourceRectAtTime() Expression Crashes AE

When attempting to add a sourceRectAtTime() expression to a Mask Path property that references a text layer, After Effects will immediately crash upon evaluation.

Reproduction steps:
1. Create a new project
2. Create a new composition (tested with HDTV 1080 29.97 preset for repro purposes)
3. Add a text layer
4. Create a comp-size solid
5. Add a comp-size mask to the solid by double clicking the mask button
6. On the "Mask Path" property of the mask created in step 5, add the expression: `thisComp.layer().sourceRectAtTime()

After clicking out of the expression editor and allowing AE to evaluate, After Effects crashes.

OS: Windows 10 Pro
OS Build: 19041.572
AE Version: 18.0.1 (Build 1)
This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

JohnColombo17100380
Community Manager
Community Manager
Sep 28, 2022 11:05 AM UTC
Hi Ethan,

Thank you for reporting this issue! We are able to reproduce this crash as well. Our team is now tracking it internally and we will investigate the root cause for a fix in a future version of AE.

Thanks again,
- John, After Effects Engineering Team
Translate
Ethan5EC1Author
Participant
Sep 28, 2022 10:02 AM UTC
Thanks, Bruno.
And to clarify my original post for the devs, I expect this expression as written to return an error - not that it should work - instead of crashing.
Translate
Bruno Quintin
Inspiring
Sep 28, 2022 10:02 AM UTC
Indeed it crashes if you put a "sourceRecAtTime()" expression to a Mask Path property.
It should return an error.
Here is an expression to create a rectangular mask on a solid based on the size of another layer :

var targetedLayer = thisComp.layer();
var W = targetedLayer.sourceRectAtTime().width;
var H = targetedLayer.sourceRectAtTime().height;
var X = targetedLayer.sourceRectAtTime().left;
var Y = targetedLayer.sourceRectAtTime().top;
var point1 = targetedLayer.toComp([X,Y]);
var point2 = targetedLayer.toComp([X+W,Y]);
var point3 = targetedLayer.toComp([X+W,Y+H]);
var point4 = targetedLayer.toComp([X,Y+H]);
createPath(points = [point1,point2,point3,point4], inTangents = [], outTangents = [], is_closed = true)
Translate