Open BigRoy opened 11 months ago
Filed as internal issue #USD-9039
Hello,
I managed to reproduce the crash with the attached C++ snippet today. Looks like the _primIndex of the new prim is null after the rename, so I'm guessing something doesn't trigger recomposition properly if prim is only defined inside a variant.
https://gist.github.com/jpankalainen/c39ebd205a383ed163f155a3a418c2ea
Description of Issue
I'd like to be able to apply an
Sdf.NamespaceEdit
inside a variant edit target, but it keeps crashing on me.Running it in Maya provides me this crash log:
Click to show Maya Crash Report
``` //===================================================== Maya Crash Report //===================================================== Exception code: C0000005: ACCESS_VIOLATION - illegal read at address 0x00000000 Fault address: D502A5FF in C:\Program Files\Autodesk\MayaUSD\Maya2024\0.26.0_202311130904-e634cda\mayausd\USD\lib\usd_pcp.dll 0001:001895FF Logical offset (see .map file for location) Call stack: Module: C:\Program Files\Autodesk\MayaUSD\Maya2024\0.26.0_202311130904-e634cda\mayausd\USD\lib\usd_usd.dll (-exported-) Location: usd_usd.dllpxrInternal_v0_22__pxrReserved__::UsdAttributeQuery::_GetIt also crashes outside of Maya in Python with
usd-core
but I'm not sure how to get such a crash dump there.See the reproducible example further down below in Steps to reproduce for more details - the following details apply to that reproducable.
It seems fine to access the PrimSpec through the
Sdf.Layer
instead of going through theUsd.Prim.GetPrimStack()
Which prints:
Still - any app is likely to crash as soon as it starts touching the prim stacks, etc.
I wonder if this hints to anything, for the crashing prim when using
prim.GetPrimStack()
:warning: :Usd.Prim.GetPrimIndex()
returnsNone
Usd.Prim.IsValid() == True
.Usd.Prim.ComputeExpandedPrimIndex()
:warning:Originally reported on USD Alliance forum here
Steps to Reproduce
Here's a Python snippet that reproduces the crash.
System Information (OS, Hardware)
OS: Windows 10 64 bit Machine: HP-Z820-02 (nothing special really)
Package Versions
Tested with both
usd-core
23.11 python package and MayaUSD0.26.0
Build Flags
n/a - releases from
pip
and Maya-USD.