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

Maya crashes on file open when a maya scene with a mayaUsdProxyShape is referenced multiple times

Open radon199 opened this issue 11 months ago • 1 comments

Describe the bug When you reference the same external maya scene file multiple times and that scene contains a mayaUsdProxyShape, Maya will crash on file open.

This behavior does not happen when there is only a single reference, or two references to two different maya files.

Steps to reproduce Steps to reproduce the behavior:

  1. Create a mayaUsdProxyShape pointing to a USD layer in a scene, and save that scene as a MB or MA file.
  2. Create a new scene, and reference the MB or MA file from step 1 twice. It must be the same MB or MA file, not different files.
  3. Save the scene, reset Maya to a new scene, and then open the saved scene.
  4. Maya will crash.

Expected behavior Maya should open a scene with multiple references to an external file containing a mayaUsdProxyShape.

Specs (if applicable):

  • Windows 10
  • Maya 2022.5 and 2024.2
  • maya_usd-0.26.0 and maya_usd-0.30.0

Additional context We have debugged it down to this line : https://github.com/Autodesk/maya-usd/blob/dc07abd3cb2d17a1c9d9cb69df941b8c75ebf47d/lib/mayaUsd/nodes/proxyAccessor.cpp#L743 I think what is happening is _forceCompute is not defined at this stage. When we have multiple references to the same file, somehow this ends up not defined. Instead of getting the MPlug directly, you can turn the MObject into a MFnDependencyNode and use findPlug with the attribute name as a MString. This is safe and doesn't cause the crash on load.

radon199 avatar Jan 23 '25 20:01 radon199

Thank you for reporting this. We will investigate.

wallworm avatar Jan 28 '25 14:01 wallworm

Hi! Do you plan to fix this bug in the near future? This is causing serious problems for us but I'd like to avoid compiling both USD and the plugin ourselves.

Szabolcs avatar Jul 28 '25 12:07 Szabolcs

Thank you for your interest (and hints above). We cannot give exact dates, but we have this in our backlog to address.

wallworm avatar Jul 28 '25 13:07 wallworm

Hi @radon199 , I tested this on my end in Maya 2025.3 with 0.31.0 and I was able to repro the crash, however, I tested the same Maya version with 0.33.0 our latest release and I was not able to reproduce the crash in that version. Could you test this out on your side and confirm that the crash is not happening with 0.33.0?

santosd avatar Sep 08 '25 15:09 santosd

@santosd I just tried with 2025 and 0.33.0 and yes, I don't get that crash anymore.

radon199 avatar Sep 09 '25 15:09 radon199

Excellent thanks for checking and verifying. I will go ahead and close this one out.

santosd avatar Sep 16 '25 15:09 santosd