OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

UsdChecker: Connectable behaviour already registered

Open dgovil opened this issue 1 year ago • 5 comments

When I run the usdChecker tests using the new framework, I am seeing a discrepancy with some of the files

This file passes with the new checker, but failed in the old one. It also now has a Coding Error. It is expected that it no longer fails, but it is odd that it raises this error.

❯ usdchecker --arkit clean/clean_flat.usdc --useNewValidationFramework
Coding Error: in RegisterBehaviorForPrimTypeId at line 454 of ../../pxr/usd/usdShade/connectableAPIBehavior.cpp -- UsdShade Connectable behavior already registered for primTypeId comprised of ';MaterialBindingAPI' type and apischemas.

Validation Result with no explicit variants set
Success!

This is a fresh build of USD 25.2a on macOS 15.4

I don't seem to get this coding error on other paths while using USD beyond the new validation framework in my limited testing.

dgovil avatar Feb 25 '25 20:02 dgovil

@dgovil possible for you to share the asset or the structure of the asset? This is interesting because the connectableAPIBehavior registration code has not been touched in a while now.

tallytalwar avatar Feb 26 '25 00:02 tallytalwar

Sorry, I should have mentioned that this is just using the sample asset in the repo already. Under the usdchecker testenv

It only gets run under the Python bindings right now

dgovil avatar Feb 26 '25 00:02 dgovil

Yeah I can repro this coding error.

tallytalwar avatar Feb 26 '25 00:02 tallytalwar

Yup, there is a race in UsdShadeConnectableAPIBehavior which is getting amplified by the new validation framework running validators in parallel. Good find Dhruv.

Running usdchecker single threaded doesn't show this:

 env PXR_WORK_THREAD_LIMIT=1 usdchecker /tmp/clean_flat.usda --useNewValidationFramework                       
Running command: /dist/sw/pxr/dev-daily/bin/usdchecker /tmp/clean_flat.usda --useNewValidationFramework
##################################################################
#  PXR_WORK_THREAD_LIMIT is overridden to '1'.  Default is '0'.  #
##################################################################

Validation Result with no explicit variants set
Success!

tallytalwar avatar Feb 26 '25 06:02 tallytalwar

Filed as internal issue #USD-10705

(This is an automated message. See here for more information.)

jesschimein avatar Feb 26 '25 19:02 jesschimein