Cannot remove prim after getting handle from dynamic control interface

Hello,

Segmentation fault happens when I try to remove a prim after getting its handle with dynamic control.
psuedocode is as follows:

prim = stage.DefinePrim(prim_path)
handle = dc.get_object(prim_path)
stage.RemovePrim(prim_path) → this results in segmentation fault

Can anyone tell me how to remove a prim after getting its handle with dynamic control??

Thanks in advance,
twjhlee

1 Like

Are you still using that handle while RemovePrim? Could you trace where that handle is being used in your code and see if not using it still creates a segfault? Does the dynamic control complains in the log? Thanks.

Hey, I have got the same issue, when I try to deactivate = delete a USD prim after I have requested its pose via the dynamic control interface. When I try to deactivate the prim via prim.SetActive(false) it throws the segmentation fault. I do not get a more meaningful error message than that. I guess this is highly related to the former issue. @HaiLocLu @twjhlee

Can you please provide a a minimal python script that reproduces the issue?

I encountered the same issue in 2021.2.1
It does not always happen. Sometimes I cannot delete Franka

@nikepupu9

  • Can you provide a script/video that shows the issue?
  • Does the issue occur with the latest 2022.1.1 release?

The system is complex at this point. I am not sure what I can do. Maybe share a private github with tons of resources with you? For the new version. I don’t know, since I change the pipeline so that I don’t need to delete Franka anymore. The previous workaround was instead of deleting franka, iuust close the current stage and open a new stage. However, this creates new issues with camera viewports (memory leak issues :( … )…