[BUG] With the expression "time <= outPoint-0.04"
- June 15, 2024
- 2 replies
- 357 views
I'm quite experienced with AE. I've encountered a strange bug on a AE expression. I had to use a hack to solve it. I'm almost sure that such a hack wasn't necessary in the past.
=> Can someone try to reproduce the bug?
Faulty AE version = 24.4.1 (Build 2).
You'll find the AE project here:
project1---bug-and-hack.aep
https://drive.google.com/file/d/1i57JibETwyXtdY-zNZ-ZXJqTZRxkIz-h/view?usp=sharing
--- --- ---
The project contains two basic "1920x1080x25fps compositions". One with the bug (called 1---Bug), and one with the hack (2---Hack).
BUGGY EXPRESSION
FRM = 0.04;
if (time < outPoint-FRM) { RESULT = 22; }
else { RESULT = 88; }
HACK EXPRESSION
FRM = 0.04 + 0.0001; // This +0.0001 is the solving hack.
if (time < outPoint-FRM) { RESULT = 22; }
else { RESULT = 88; }
ANALYSE OF THE PROBLEM
It seems that an operation such "time-(outPoint-0.04)" return a number with lots of decimals (something like -0.040000000000000924).
More precisely:
"time-(outPoint-0.04)" = Negative number.
"time-(outPoint-0.040001)" = Positive number.
This probably explains the bug. The negative number disturbs the calculation. If it's the case, it's quite a big bug because it may potentially break all expressions using time & outPoint.
=> Is it such a decimal problem already known/managed?
It's not the first time I had to use this kind of hack, but it's the first time on an expression that basic.
Thank you a lot for your help.
