Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions After Effects error: Unsafe Operation Attempted ( 58 :: 0 )

  • After Effects error: Unsafe Operation Attempted ( 58 :: 0 )

    Posted by Sean Mcclintock on April 28, 2013 at 6:57 pm

    Keep getting this error in CS5 and can’t seem to isolate where it’s coming from or how to avoid it. End up having to force quit After Effects to get out of the error loop. Think it might have something to do with the sampleImage(); command but not sure.

    Any help would be greatly appreciated!

    timeEnabled = thisComp.layer("Controls").effect("Enable Time Offset")("Checkbox");
    restartEnabled = thisComp.layer("Controls").effect("Restart Time")("Checkbox");

    frameOffset = thisComp.layer("Controls").effect("Frame Offset")("Slider");
    if(timeEnabled > 0){
    n = name.slice(2);
    tile = thisComp.layer("m_" + n)
    targetLayer =thisComp.layer("Controls").effect("Map")("Layer")
    samplePoint = tile.transform.position
    sampleRadius = [1,1];
    above = false;

    if(restartEnabled>0){
    for (f = timeToFrames(); f>= timeToFrames(inPoint); f--){
    t = framesToTime(f);
    sampledColor_8bpc = 255 * targetLayer.sampleImage(samplePoint, sampleRadius,true,t);
    R = Math.round(sampledColor_8bpc[0]);

    if (R>1 ){
    above = true; break;
    }
    }
    }else{

    for (f = timeToFrames(inPoint); f<=timeToFrames(); f++){
    t = framesToTime(f);
    sampledColor_8bpc = 255 * targetLayer.sampleImage(samplePoint, sampleRadius,true,t);
    R = Math.round(sampledColor_8bpc[0]);

    if (R==0){
    t = t - framesToTime(1);
    above = true; break;
    }

    }
    }

    if (above) time - t + framesToTime(frameOffset) else 0;
    }else{
    time;
    }

    Sean Mcclintock replied 13 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    April 28, 2013 at 7:28 pm

    What property is expression applied to? Is there any chance that the result of the expression changes the target layer?

    Dan

  • Sean Mcclintock

    April 28, 2013 at 8:28 pm

    Thanks for checking this out Dan. It’s applied to Time Remap. Unfortunately the comp that it’s referencing isn’t affected by the expression. Here’s a link to the file: https://dl.dropboxusercontent.com/u/1881942/Coke-TimeRemap-CC-v024.aep

    Usually I can trigger the error loop by attempting to duplicate the comp in the project window.

  • Dan Ebberts

    April 28, 2013 at 8:58 pm

    I was able to reproduce the error in CS5. I don’t see anything obvious that could be causing it except maybe that there is a lot of expression crunching going on.

    It does seem to work OK in CS6, so it may be a bug that was discovered and fixed. I don’t know what else to tell you.

    Dan

  • Sean Mcclintock

    April 28, 2013 at 9:03 pm

    Ok, thanks again for taking a look at it Dan.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy