FIXED:Crash When Destroying COMP with 2 TOP Transforms

64 bit Build 16620
Windows 10

I’m copying a COMP that contains a TOP rectangle that’s going through 1 transform with an animation on translation and then another transform that has adjusted rotation and scale. Then there’s a timer that destroys the COMP with Python when it’s done. When the timer is done, TouchDesigner hangs and crashes.

I’ve traced the problem to these specific circumstances: the 2nd transform connecting with the 1st transform (it doesn’t crash when there is no animation on the 1st transform), the timer destroying the COMP (it doesn’t crash when I don’t destroy it). I also tried replacing the 2nd transform with other kinds of TOPs like flip and fit and they also crash.

To replicate in the TOE, press - and when the animation is done it will crash.
lines.toe (6.64 KB)

Thanks for the sample. Ya, I don’t think it’s specific to a Transform TOP. Looking into a fix.

Thanks, just wondering, what would be a realistic eta for a fix?

Hard to say. You may be able to rework the network to avoid it though. I’m curious what the goal is here? In generally you shouldn’t be dynamically creating and destroying nodes during playback, it’ll cause stutters.

Would there be a better way to do this? I’m trying to dynamically create shapes in real-time that will have random motion and appearance.

The issue was the node that was deleting itself during one of its own callbacks.
This is now fixed and we should have a post out in a few days, but in the meantime you can workaround the bug by delaying your deletes by a frame:

    cmd = "op('_P1_').destroy(); op('_P2_').destroy();"
    cmd = cmd.replace('_P1_', par.outputs[0].path);
    cmd = cmd.replace('_P2_', par.path);
    run(cmd, delayFrames = 1)

#   par.outputs[0].destroy()
#   par.destroy()

A quicker way may be to maintain a pool of re-used components that never shrinks and dynamically set the list of current ones in the Composite TOP, thought that would take a bit more setup.

Cheers,
Rob.