You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maddy Adams discovered a regression in USD 25.2 that causes a crash when you have cyclical layers. This used to be a warning in 24.11 and prior, but is now a hard crash.
See the following Python example:
"""This file will may create the following files, depending on settings: Top.usda, CopyDest.usda, CopySrc.usda, Opinion.usda, CopyDest.usda, Opinion.usda, Sub/copy.usda, Sub/Sub/copy.usda, Sub/opinion.usda"""# If CREATE_CYCLE is True, 24.11 will emit a warning about creating a cycle# and 25.02 will crash. If CREATE_CYCLE is False, both versions will succeed with no warningsCREATE_CYCLE=TruefrompxrimportUsd, Sdf, UsdGeom# PYTHONPATH=USD_INSTALL_ROOT/lib/python# PATH=USD_INSTALL_ROOT/binprint(f"Using OpenUSD from {Usd.__file__}")
topFile="Top.usda"copyDestFile="CopyDest.usda"copySrcFile="CopySrc.usda"opinionFile="Opinion.usda"topSublayerPathToAdd="CopyDest.usda"copySrcCyclePathToAdd=NonecopySrcSublayerPathToAdd="Opinion.usda"ifCREATE_CYCLE:
copyDestFile="Sub/copy.usda"copySrcFile="Sub/Sub/copy.usda"opinionFile="Sub/Sub/opinion.usda"topSublayerPathToAdd="Sub/copy.usda"copySrcCylePathToAdd="Sub/copy.usda"copySrcSublayerPathToAdd="Sub/copy.usda"top=Usd.Stage.CreateNew(topFile)
copyDest=Usd.Stage.CreateNew(copyDestFile)
copySrc=Usd.Stage.CreateNew(copySrcFile)
opinion=Usd.Stage.CreateNew(opinionFile)
opinion.DefinePrim("/foo", "Sphere")
top.GetRootLayer().subLayerPaths.append(topSublayerPathToAdd)
ifcopySrcCyclePathToAddisnotNone:
copySrc.GetRootLayer().subLayerPaths.append(copySrcCyclePathToAdd)
copySrc.GetRootLayer().subLayerPaths.append(copySrcSublayerPathToAdd)
print("Top before TransferContent")
print(top.ExportToString())
print("\nAbout to TransferContent")
copyDest.GetRootLayer().TransferContent(copySrc.GetRootLayer())
print("\n\nTop after TransferContent")
print(top.ExportToString())
In 24.11 and prior, it would instead report this warning:
Warning: in _ReportErrors at line 3258 of ../../pxr/usd/usd/stage.cpp -- Sublayer hierarchy with root layer @/Users/dhruvgovil/Downloads/Sub/copy.usda@ has cycles. Detected when layer @/Users/dhruvgovil/Downloads/Sub/Sub/copy.usda@ was seen in the layer stack for the second time. (Recomposing stage on stage @/Users/dhruvgovil/Downloads/Sub/Sub/copy.usda@ <0x12d903a00>)
Warning: in _ReportErrors at line 3258 of ../../pxr/usd/usd/stage.cpp -- Sublayer hierarchy with root layer @/Users/dhruvgovil/Downloads/Sub/Sub/copy.usda@ has cycles. Detected when layer @/Users/dhruvgovil/Downloads/Sub/copy.usda@ was seen in the layer stack for the second time. (Recomposing stage on stage @/Users/dhruvgovil/Downloads/Top.usda@ <0x12d875400>)
Warning: in _ReportErrors at line 3258 of ../../pxr/usd/usd/stage.cpp -- Sublayer hierarchy with root layer @/Users/dhruvgovil/Downloads/Sub/Sub/copy.usda@ has cycles. Detected when layer @/Users/dhruvgovil/Downloads/Sub/copy.usda@ was seen in the layer stack for the second time. (Recomposing stage on stage @/Users/dhruvgovil/Downloads/Sub/copy.usda@ <0x12d875a00>)
The text was updated successfully, but these errors were encountered:
Does this crash if PCP_ENABLE_MINIMAL_CHANGES_FOR_LAYER_OPERATIONS is set to 0, to disable the change processing optimizations for sublayers, which are now enabled by default in v25.02 ? Thanks!
Maddy Adams discovered a regression in USD 25.2 that causes a crash when you have cyclical layers. This used to be a warning in 24.11 and prior, but is now a hard crash.
See the following Python example:
This results in the following with 25.2
A full crash trace is below.
log.txt
In 24.11 and prior, it would instead report this warning:
The text was updated successfully, but these errors were encountered: