maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

Duplicating Parent of usdProxyShape Crashes Maya at Save Time

Open RebeccaYzy opened this issue 1 year ago • 7 comments

Describe the bug Hi. We've been testing the 0.24.0 release recently in our studio. We are working with Maya 2022.5 and there seems to be an issue introduced in the latest release. Maya crashes every time if we duplicate the parent transform node of usdProxyShape and then save the file.

Steps to reproduce Steps to reproduce the behavior:

  1. Create stage from any usd file, e.g. Book in pixar Kitchen_set.
  2. Select the parent transform node, hit Ctrl + D.
  3. Try saving the file, and Maya will crash. We are seeing this on both win 11 and ubuntu. We tried as well with Maya 2022.5 & 0.22.0 release, and there is no problem like this.

maya 2022.5 + 0.24.0 release: 0 24 0

maya 2022.5 + 0.22.0 release works with no problem: 0 22 0

Expected behavior Maya can finish saving the file with no crash.

Attachments If applicable, add screenshots, sample files, etc to help explain your problem.

Specs (if applicable):

  • OS & version [Win 11 & Ubuntu]
  • Maya version [Maya 2022.5]
  • Maya USD commit SHA [e.g. dev at 232d9ee] 0.24.0 release

RebeccaYzy avatar Aug 17 '23 06:08 RebeccaYzy

I would like to add that this bug was also present in Maya USD 0.26.0 with Maya 2023, but it seems to have been partially fixed in 0.27.0. I say partially, because if you replicate the original steps from this issue, it doesn't crash anymore.

However, if you parent the USD proxy nodes after having duplicated them, it will still crash.

New steps:

  1. Create a USD proxy node (Create -> Universal Scene Description (USD) -> Stage with New Layer).
  2. Duplicate the USD proxy node (select the node and then Ctrl + D).
  3. Parent both USD proxy nodes to a group (select both transform nodes and Ctrl + G).
  4. Save the scene using Save As.
  5. Maya will crash.

Jimmy-LeeBoisvert avatar Mar 05 '24 15:03 Jimmy-LeeBoisvert

Thank you for sharing this with us. We will look into it some more.

wallworm avatar Mar 05 '24 18:03 wallworm

Hi @Jimmy-LeeBoisvert thank you for reporting this. I tested it in our 0.27.0 release and I was able to hit the crash like you said However, in the latest code that has been merged I was not able to hit the crash so it seems that this issue has been resolved. Are you able to build the latest to give it a try? If not, you can test after our next release and the issue should be resolved.

santosd avatar Mar 05 '24 21:03 santosd

@santosd that's great to hear. Thanks a lot for checking that out. We can build from the latest revision on our side and give it a try (most likely tomorrow). I'll let you know how that goes.

Thanks!

Jimmy-LeeBoisvert avatar Mar 05 '24 21:03 Jimmy-LeeBoisvert

@santosd in our custom build based on the latest revision and built against USD 22.11, there seems to be an improvement, because if we follow the steps I've mentioned earlier, it doesn't crash anymore, but if we add one extra step, which is to simply rename the group after it is created, and then save, it will still crash, unfortunately.

We're going to try soon with USD 21.11, as that's the version used in 0.27.0, just in case it gives a different result.

Thanks for the support!

New steps:

  1. Create a USD proxy node (Create -> Universal Scene Description (USD) -> Stage with New Layer).
  2. Duplicate the USD proxy node (select the node and then Ctrl + D).
  3. Parent both USD proxy nodes to a group (select both transform nodes and Ctrl + G).
  4. Rename the group that was just created (e.g. name it "aaa").
  5. Save the scene using Save As.
  6. Maya will crash.

Jimmy-LeeBoisvert avatar Mar 06 '24 17:03 Jimmy-LeeBoisvert

Some more info: from the stack trace, the crash seems to indicate that the issue is related to the serialization of the USD stage's load rules. I noticed that when I duplicate a USD proxy node, and then try to get the load rules from a duplicated node's stage, no rules are set, even though the original USD proxy node did have the AllRule rule.

Edit: it might just be a coincidence, as the stack trace also refers to setting the forceCompute attribute, and so when I set that attribute's value manually after having duplicated and reparented the proxy nodes, and renamed the parent group, the crash also occurs (without serializing the load rules).

Jimmy-LeeBoisvert avatar Mar 06 '24 19:03 Jimmy-LeeBoisvert

Tested on mayausd 0.28, now save scene after duplicate usd proxy doesn't crash maya. However, now after duplicate, if we hide the duplicated usd proxy, maya will crash.

New steps:

  1. Create a USD proxy node (Create -> Universal Scene Description (USD) -> Stage with New Layer).
  2. Duplicate the USD proxy node (select the node and then Ctrl + D).
  3. Hide the duplicated USD proxy.

sylvieChen avatar Jun 25 '24 17:06 sylvieChen