FIXED:Errors when destroying COMPs with Python that contain RayTK operators [2023.12120 Win]

When I try to destroy a COMP with Python that contains RayTK operators, I often get numerous errors like this:
td.tdError: Operator /project1/base2/raymarchRender3D/depth_out has been deleted.

I’ve tried adding a check for the .valid property, but that property produces True and then the error still happens:

o = op('foo')
if o.valid:
  o.destroy()

Strangely it’s sometimes impossible to catch the exception. For example:

try:
  op('foo').destroy()
except Exception as e:
  print('OH NO!', e)  # <-- this never gets called

or even:

try:
  op('foo').destroy()
except td.tdError as e:
  print('OH NO!', e)  # <-- this never gets called

This has been an issue for at least a few years.
I think maybe I’ve seen it happen when deleting things that don’t contain RayTK operators but I can’t reproduce it that way currently.
I’ve attached a file that includes examples to reproduce the issue.
debug-deletion.toe (196.4 KB)

Hi @tekt,

thanks for reporting, can easily reproduce and we will have a look at it.

cheers
Markus

This will be fixed in the next posted builds 2023.12190 and later.
Cheers.

1 Like

Excellent. Thanks!