Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
760 stars 202 forks source link

[MAYA-114369] Crash when duplicating groups with loaded descendants #1763

Closed gracekumagai closed 2 years ago

gracekumagai commented 2 years ago

Describe the bug If you create a group with a loaded or unloaded model, load the group, duplicate the group and try to load the group with descendants, Maya will crash.

Steps to reproduce Steps to reproduce the behavior:

  1. Open 'kitchen_set_instanced'
  2. Unload the |Kitchen_set_instanced|Kitchen_set_instancedShape,/Kitchen_set
  3. Navigate to and click on the |Kitchen_set_instanced|Kitchen_set_instancedShape,/Kitchen_set/Props_grp/North_grp/SinkArea_grp/FlowerPotB_1 or any prim with a composition arc / is a component.
  4. Press Ctrl+g to group
  5. Right click on group -> Load with Descendents
  6. Click on group, ctrl+d to duplicate
  7. Right click on the new duplicated group -> Load with Descendants

Step 7 will trigger the crash.

Error:

maya.bin crashed. FATAL ERROR: Failed axiom: ' _primIndex '
in GetSourcePrimIndex at line 104 of pxr/usd/usd/primData.cpp

If you skip step 5 and do not load the group with descendants before duplicating, it will not crash. Maya will crash regardless if the initially grouped prim was initially loaded or unloaded.

Expected behavior I would expect Maya to load the group and not crash.

Specs (if applicable):

santosd commented 2 years ago

Hello Grace, Thank you for reporting this issue. I tested it in the latest PR and was still able to repro the crash. I have logged the issue internally as MAYA-114369. Thanks again and good catch.

gracekumagai commented 2 years ago

Hey @santosd, I encountered the same error during a crash with slightly different repro steps:

  1. Open 'kitchen_set_instanced'
  2. Unload |Kitchen_set_instanced|Kitchen_set_instancedShape,/Kitchen_set/Props_grp/West_grp/Ball_1
  3. Press Ctrl+g to group the unloaded Ball_1
  4. Press Ctrl+z to undo the group action
  5. Press Ctrl+d to duplicate Ball_1
  6. Load the duplicate of Ball_1

Step 6 triggers the same crash error mentioned above.

crash_duplicate_unload Let me know if you'd like me to file a new ticket. Thanks!

santosg87 commented 2 years ago

HI @gracekumagai this issue should be fixed on the latest version of the plugin, are you able to confirm and close? :)

gracekumagai commented 2 years ago

Hi @santosg87, this seems to be fixed now! Thank you!