Autodesk / Autodesk/maya-usd

MayaUSD plugin load debugging

Open
#3,846 3 comments 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

**Describe the bug**
When loading in `maya-usd` into Maya (2022.4) from a custom-build, there are issues trying to load these:
```
// Error: file: C:/Program Files/Autodesk/Maya2022/scripts/others/pluginWin.mel line 316: Unable to dynamically load : c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/adsk/plugin/mayaUsdPlugin.mll
The specified procedure could not be found.
//
// Error: file: C:/Program Files/Autodesk/Maya2022/scripts/others/pluginWin.mel line 316: The specified procedure could not be found.
(mayaUsdPlugin) //
```
From Python I can load stuff out of the `pxr` module to verify it is loading:
```
from pxr import Usd
print(Usd.GetVersion())
(0, 24, 5)
```
Also I have `DependenciesGui.exe` installed that I launch from the Maya python script editor:
```
import os, subprocess
subprocess.Popen("C:/Users/alex.fuller/dependencies/dependenciesgui.exe", env=os.environ)
```
And can verify the `.mll` libraries are locating the correct `.dll`s that I am expecting and nothing from anywhere else.

```
getenv "PATH";
// Result: C:/Program Files/Autodesk/Maya2022/Python37/lib/site-packages/PySide2;C:/Program Files/Autodesk/Maya2022/plug-ins/ATF/ATF;C:/Program Files/Autodesk/Maya2022/plug-ins/ATF/ATF/alias;C:/Program Files/Autodesk/Maya2022/bin/Cg;C:/Program Files/Autodesk/Maya2022/bin;C:/Program Files/Autodesk/Maya2022/bin3;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4/bin;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4/libnvvp;C:/Windows/system32;C:/Windows;C:/Windows/System32/Wbem;C:/Windows/System32/WindowsPowerShell/v1.0/;C:/Windows/System32/OpenSSH/;C:/ProgramData/chocolatey/bin;c:/salt;C:/Program Files/Microsoft VS Code/bin;C:/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/;C:/Program Files/NVIDIA Corporation/Nsight Compute 2024.1.1/;C:/Users/alex.fuller/scoop/apps/perl/current/perl/site/bin;C:/Users/alex.fuller/scoop/apps/perl/current/perl/bin;C:/Users/alex.fuller/scoop/shims;C:/Users/alex.fuller/AppData/Local/Microsoft/WindowsApps;c:/rez-2.107.0.2/Scripts/rez;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/al/lib;C:/Program Files/Autodesk/Bifrost/Maya2022/2.3.1.0/bifrost/bin;C:/Program Files/Autodesk/Maya2022/plug-ins/MASH/bin;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/lib;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/lib/gtest;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/pxr/maya/lib;c:/users/alex.fuller/local_packages/usd/24.05/platform-windows/arch-AMD64/python-3.7/ext/bin;c:/users/alex.fuller/local_packages/usd/24.05/platform-windows/arch-AMD64/python-3.7/ext/lib;c:/users/alex.fuller/local_packages/usd/24.05/platform-windows/arch-AMD64/python-3.7/ext/plugin/usd;C:/Program Files/Side Effects Software/Houdini 20.0.590/engine/maya/maya2022/../../../bin;C:/Program Files/Autodesk/Arnold/maya2022/bin;C:/Program Files/Allegorithmic/Adobe Substance 3D for Maya/2022/lib;C:/Program Files/Autodesk/Bifrost/Maya2022/2.3.1.0/vnn/bin;C:/Program Files/Autodesk/Maya2022/plug-ins/xgen/bin //

getenv "PYTHONPATH";
// Result: C:/Program Files/Autodesk/Maya2022/Python37/DLLs;C:/Program Files/Autodesk/Maya2022/Python37/lib/site-packages;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/al/scripts;C:/Program Files/Autodesk/Maya2022/plug-ins/ATF/scripts;C:/Program Files/Autodesk/Bifrost/Maya2022/2.3.1.0/bifrost/scripts;C:/Program Files/Autodesk/Maya2022/plug-ins/MASH/scripts;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/adsk/scripts;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/lib/scripts;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/pxr/maya/lib/usd/usdMaya/resources;C:/Program Files/Rokoko Motion Library/Maya/2022/scripts;c:/users/alex.fuller/local_packages/usd/24.05/platform-windows/arch-AMD64/python-3.7/ext/lib/python;C:/Program Files/Autodesk/Maya2022/plug-ins/fbx/scripts;C:/Program Files/Side Effects Software/Houdini 20.0.590/engine/maya/maya2022/scripts;C:/Program Files/Autodesk/Maya2022/plug-ins/camd/scripts;C:/Program Files/Autodesk/Arnold/maya2022/scripts;C:/Program Files/Allegorithmic/Adobe Substance 3D for Maya/2022/scripts;C:/Program Files/Autodesk/Maya2022/plug-ins/sweep/scripts;C:/Program Files/Autodesk/Bifrost/Maya2022/2.3.1.0/vnn/scripts;C:/Program Files/Autodesk/Maya2022/plug-ins/xgen/scripts;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/al/lib/python;C:/Program Files/Autodesk/Bifrost/Maya2022/2.3.1.0/bifrost/python/site-packages;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/lib/python;c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext/plugin/pxr/lib/python; //

getenv "MAYA_MODULE_PATH";
// Result: c:/users/alex.fuller/local_packages/mayaUSD/0.29.0/platform-windows/maya-2022/ext;C:/Program Files/Autodesk/Maya2022/modules;C:/Users/alex.fuller/Documents/maya/2022/modules;C:/Users/alex.fuller/Documents/maya/modules;C:/Program Files/Common Files/Autodesk Shared/Modules/maya/2022 //
```

**Steps to reproduce**
Steps to reproduce the behavior:
1. Get all the dependencies and requirements stated in https://github.com/Autodesk/maya-usd/blob/dev/doc/build.md but with slight differences (using `openusd 24.05`)
2. Build `openusd 24.05` + `maya-usd 0.29.0` using `Visual Studio 17 2022` and the `-Tv142` toolset so it matches 2019 which Maya 2022.4 was built from (this builds successfully with minor tweaking)
3. Make sure the `.mod` files point exactly to openusd/maya-usd (rez build)
4. Set `MAYA_MODULE_PATH` to where the generated mod files are located
5. Load any of the newly created plugins

**Expected behavior**
More thorough error logging to why a plugin won't load (if possible).

**Attachments**
![Screenshot from 2024-07-11 16-14-23](https://github.com/Autodesk/maya-usd/assets/5601445/4d7e2c1e-3c99-4a04-8cc4-85af8d588b75)

**Specs (if applicable):**
- Windows 10 w/ `10.0.19041` SDK
- Visual Studio 17 2022 but with v14.2 toolset to match 2019
- Maya 2022.4
- maya-usd branch `release/0.29.0`
- openusd version tag `v24.05`

**Additional context**
I understand that the latest isn't supported with an older Maya, but I am inclined to think it is something else going on here that I'd like to get to the bottom of. I will try an older version of `openusd` next.

The documentation doesn't really discuss this as an issue to look out for, but when building `openusd` it builds a few dependencies like `TBB` which would overlap Maya's built-ins, is this not an issue in-practice?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.