Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when dependent prims are removed in specific order #680

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

lilleyse
Copy link
Contributor

The following scenario would cause a crash:

  • Receive notification that CesiumIonServer was removed
  • Receive notification that CesiumIonRasterOverlay was removed

When prims are removed they update any assets that have a relationship to them. If the other assets had also been removed from the stage, during their update they may try to access properties on a USD prim that no longer exists.

I ended up making the fix in UsdNotificationHandler so that it checks whether prims exist before updating them.

I was able to trigger this by loading imagery-single-2.zip, hand deleting the raster overlay and rel from the .usda, and clicking the fetch changes button. This USD is a bit older and doesn't have an ion server in it, so the default ion server gets removed and the raster overlay gets removed.

@lilleyse
Copy link
Contributor Author

@corybarr I ended up changing the approach because I realized this could be a broader issue. Now I check if the schema is valid before getting or setting an attribute.

@lilleyse lilleyse merged commit 164c163 into main Feb 13, 2024
3 checks passed
@lilleyse lilleyse deleted the remove-prim-safeguards branch February 13, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants