Skip to main content
Participant
September 28, 2022

[Bug Report] Adding sourceRectAtTime() Expression Crashes AE

  • September 28, 2022
  • 3 replies
  • 363 views
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 has been closed for replies.

3 replies

JohnColombo17100380
Community Manager
Community Manager
September 28, 2022
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
Ethan5EC1Author
Participant
September 28, 2022
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.
Bruno Quintin
Inspiring
September 28, 2022
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)