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

Coding error in usdchecker when using internal references #1902

Closed
hinton-mgi opened this issue Jun 11, 2022 · 2 comments
Closed

Coding error in usdchecker when using internal references #1902

hinton-mgi opened this issue Jun 11, 2022 · 2 comments

Comments

@hinton-mgi
Copy link

Description of Issue

Instead of printing any compliance issues and gracefully exiting, usdchecker fails with an error for some usd files. I believe this particular problem occurs when the usd file contains internal references.

Steps to Reproduce

  1. Create test.usda with the following contents:
#usda 1.0

def Sphere "sphere"
{
}

def "clone" (
    prepend references = </sphere>
)
{
}
  1. run usdchecker test.usda
  2. My result was:
Traceback (most recent call last):
  File "D:\Testing\USD-sdk\bin\usdchecker", line 149, in <module>
    sys.exit(main())
  File "D:\Testing\USD-sdk\bin\usdchecker", line 118, in main
    checker.CheckCompliance(inputFile)
  File "D:\Testing\USD-sdk\lib\python\pxr\UsdUtils\complianceChecker.py", line 969, in CheckCompliance
    UsdUtils.ComputeAllDependencies(Sdf.AssetPath(inputFile))
pxr.Tf.ErrorException:
        Error in 'pxrInternal_v0_22__pxrReserved__::SdfComputeAssetPathRelativeToLayer' at line 92 in file D:\Testing\USD\pxr\usd\sdf\layerUtils.cpp : 'Layer path is empty'

System Information (OS, Hardware)

Windows 10

Package Versions

USD built from dev branch, HEAD at commit a470570

Build Flags

PXR_ENABLE_METAL_SUPPORT=FALSE
PXR_ENABLE_VULKAN_SUPPORT=FALSE
PXR_ENABLE_PTEX_SUPPORT=FALSE
PXR_USE_PYTHON_3=ON

@spiffmon
Copy link
Member

Thanks for reporting, @hinton-mgi - I can't believe this has gone undetected so long! For the fixer: I investigated, and think the culprit is _FileAnalyzer::_ProcessReferences(), though _FileAnalyzer::_RemapRefOrPayload() and _FileAnalyzer::_ProcessPayloads() are similarly unguarded against internal references.

@sunyab
Copy link
Contributor

sunyab commented Jun 13, 2022

Filed as internal issue #USD-7424

marktucker pushed a commit to sideeffects/USD that referenced this issue May 11, 2023
if UsdUtilsComputeAllDependencies encountered a local
reference or payload.

Fixes PixarAnimationStudios#1902

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