Isaac Sim update_stage (crash) / force reload

Hello,

I am building an extension that loads in USD assets to the stage using “add_reference_to_stage”. It then also adds collisions with “.setCollider(subchild, approximationShape=“none”)”. I then want to start the simulation and perform some raycasts. These raycasts fail because I assume the stage has not fully loaded as eventhough the code has finished running the application gets locked up and freezes (somewhat expected) until it has populated and loaded all the physics. If I perform an “is_stage_loading” check prior to trying to start the simulation and raycasts it returns False indicating that nothing is loading. I require this code to be “continuous” as it initially takes user input from a button press and should perform all the required actions with only one interaction with the user.

I would like to know if there is a way to control this stage loading and wait until it has loaded, so I can continue running code and perform the raycasts. I attempted utilising the “update_stage()” method but this for some reason crashes isaac sim with the following error:

2024-04-26 14:35:15 [384,235ms] [Error] [carb.graphics-vulkan.plugin] VkResult: ERROR_DEVICE_LOST
2024-04-26 14:35:15 [384,235ms] [Error] [carb.graphics-vulkan.plugin] submitToQueueCommon failed.
2024-04-26 14:35:15 [384,240ms] [Error] [rtx.scenedb.plugin] Failed to perform resize destination table to size 10488260
2024-04-26 14:35:15 [384,241ms] [Error] [carb.graphics-vulkan.plugin] VkResult: ERROR_DEVICE_LOST
2024-04-26 14:35:15 [384,241ms] [Error] [carb.graphics-vulkan.plugin] submitToQueueCommon failed.
2024-04-26 14:35:15 [384,241ms] [Error] [carb.scenerenderer-rtx.plugin] Failed to execute RenderGraph on device 0. Error Code: 2
2024-04-26 14:35:15 [384,242ms] [Error] [gpu.foundation.plugin] A GPU crash occurred. Exiting the application…
Reasons for the failure: a device lost, out of memory, or an unexpected bug.

Not sure what other methods I can try to force this reload (I also tried async versions).
Any thoughts or advice would be greatly appreciated.

Many thanks,
Jon