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

Verification error when setting prim instanceable to be false #1551

Closed
csyshing opened this issue Jul 6, 2021 · 1 comment
Closed

Verification error when setting prim instanceable to be false #1551

csyshing opened this issue Jul 6, 2021 · 1 comment

Comments

@csyshing
Copy link

csyshing commented Jul 6, 2021

Description of Issue

Hi,

I was debugging an issue when setting prim instanceable to be false, USD is throwing verification exception, not sure if there is something I missed or maybe a bug in USD?

Thanks,
Zhicheng

Steps to Reproduce

  1. Load the problematic USD file "test_error_verification.usda" from attachment in usdview:
usdview /path/to/test_error_verification.usda
  1. Run the code snippet below in usdview:
stage = usdviewApi.stage
groupedPrimPath = "/root/group/ball_01" # Change the prim path to /root/a_group/ball_01 if it's "test_no_error.usda"
# Modify translate of the first prim
prim01 = stage.GetPrimAtPath(groupedPrimPath)
translateOp01 = UsdGeom.Xformable(prim01).AddTranslateOp()
translateOp01.Set((1, 2, 3))
# Set instanceable to be false for the second prim
prim02 = stage.GetPrimAtPath("/root/ball_02")
prim02.SetInstanceable(False)                   # raise exception

OR execute from the Python shell in usdview:

execfile('/path/to/test_instanceable.py', globals(), locals())

The file "test_instanceable.py" is also in attachment.

  1. Check the console output, usdview would print out the exception like this:
	Error in 'pxrInternal_v0_21__pxrReserved__::UsdImagingInstanceAdapter::_GetProtoPrim' at line 2159 in file /path/to/usd/source/pxr/usdImaging/usdImaging/instanceAdapter.cpp : 'Failed verification: ' r ' -- instancer = /root/group/ball_01, cachePath = /root/group/ball_01'
	Error in 'pxrInternal_v0_21__pxrReserved__::UsdImagingInstanceAdapter::ProcessPropertyChange' at line 1261 in file /path/to/usd/source/pxr/usdImaging/usdImaging/instanceAdapter.cpp : 'Failed verification: ' proto.adapter ' -- /root/group/ball_01'
	Error in 'pxrInternal_v0_21__pxrReserved__::UsdImagingInstanceAdapter::_GetProtoPrim' at line 2159 in file /path/to/usd/source/pxr/usdImaging/usdImaging/instanceAdapter.cpp : 'Failed verification: ' r ' -- instancer = /root/group/ball_01, cachePath = /root/group/ball_01'
	Error in 'pxrInternal_v0_21__pxrReserved__::UsdImagingInstanceAdapter::ProcessPropertyChange' at line 1261 in file /path/to/usd/source/pxr/usdImaging/usdImaging/instanceAdapter.cpp : 'Failed verification: ' proto.adapter ' -- /root/group/ball_01'

This is not a problem in usdview since usdview itself catches the exception, but it breaks our pipeline tools.

  1. Strangely repeat the steps 1-3 with another USD file "test_no_error.usda", which has just one difference: the group name, does not trigger any exception.
# "test_error_verification.usda" file:
....
def Xform "group" {
....

# "test_no_error.usda" file:
....
def Xform "a_group" {
....

System Information (OS, Hardware)

OS: CentOS 7.4

Package Versions

Official USD-19.11 : Cannot reproduce the error above
Official USD-20.11/21.02/21.05: Reproducible

Build Flags

Standard flags as build script.

usd_verification_error.zip

@jilliene
Copy link

jilliene commented Jul 7, 2021

Filed as internal issue #USD-6778

marktucker pushed a commit to sideeffects/USD that referenced this issue Sep 18, 2021
…s in the same frame.

This is actually a rehash of github issue PixarAnimationStudios#1417, which was the same bug in PointInstancers rather than native USD instancing.  If we get multiple property edits to native instancers in the same frame, it's possible that the first will resync the instancer and erase instancer map data, and then the second property edit will be unable to find the instancer to update.  This is totally expected and fine, since the resync will repopulate everything correctly, but our TF_VERIFY statements were a bit too aggressive.

This change relaxes the TF_VERIFY calls in the edit codepath.  I also fixed up a few stray callers of the affected utility functions to do return value checking/TF_VERIFY where appropriate.

Fixes PixarAnimationStudios#1551

(Internal change: 2178348)
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

No branches or pull requests

3 participants