Skip to main content
Participant
January 15, 2016
Answered

Serious crashes with expression controling the letter-spacing based on layer z-position

  • January 15, 2016
  • 2 replies
  • 583 views

I have massive crashes when using this expression script below. I just have a text layer where I control the letter-spacing depandend from the current z-position. Beginning from z=0 up to -500 (directly in front of the camera) the values are transformed by easyOut() to 0-10. That's all so far.

When now I duplicate this text line several times and start to tweak it's position then the crash happens. The more text layers I have the sooner the crash. This happens during editing so no rendering involved. In the preview is the standard renderer applied.

Unfortunately there is no specific error message - it tells just that AFX isn't working any more and is closing now.

My system specs:

I have 8 GB RAM and 10 GB disk cache. This should be enough for some text flying around.

I use the latest AFX CC Version 2015.1 13.6.1.6 running on Windows 8.1 Ultrabook (Lenovo Yoga 1). No CUDA detected so the preview is rendered by the CPU.

Have someone an idea why this happens? Help is highly appreciated.

max_spacing = 10;

z_position = transform.position[2];

var new_spacing = easeOut(z_position, -500, 0, max_spacing, 0);

text.animator("Animator 1").property.trackingAmount = new_spacing;

This is my test scene:

http://augenpulver-design.de/exchange/tmp/AFX_Expression_Crash_Scene.zip

This topic has been closed for replies.
Correct answer Mylenium

You are creating a logic hole by referencing the layer itself most likely. Shouldn't happen, so I'd call it a bug. Presumably to do with the flaky matrix code also used for snapping and a few other things. Try to use a Null and parent the text to it. This might work much better.

Mylenium

2 replies

Dan Ebberts
Community Expert
Community Expert
January 15, 2016

I'm not seeing the issue on my system. I'm assuming you've applied this expression to the Tracking Amount property of a 3D text layer. You could simplify the expression like this (but it shouldn't make any difference):

max_spacing = 10;

z_position = transform.position[2];

easeOut(z_position, -500, 0, max_spacing, 0);

Dan

HexodusAuthor
Participant
January 16, 2016

Dan, thank you for trying helping me but even the simplest version leads to crash. As Millenium told us  - self referencing is a problem and causes buffer overflows. Adobe should really make a deeper look inside their scripting engine. Self referencing is a common coding style and should work no matter what or where.

Mylenium
MyleniumCorrect answer
Legend
January 15, 2016

You are creating a logic hole by referencing the layer itself most likely. Shouldn't happen, so I'd call it a bug. Presumably to do with the flaky matrix code also used for snapping and a few other things. Try to use a Null and parent the text to it. This might work much better.

Mylenium

HexodusAuthor
Participant
January 16, 2016

Mylenium‌ You're right self referencing seems to be the main problem which leads to buffer overflow and crashes. In my test project I applied the spacing attribute from the parented null and voila - it works Well this script (i posted the simplified version) isn't that user friendly any more. Every script has now to be manually pointing to the parenting null and there is much more rubbish inside the composition. Yes, success comes at a price   Anyways, thank you so much for pointing me in the right direction