mayapy segfaults when trying to scene files with references locked (not attributes but the ref node itself is locked)
# lock.py
import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
cmds.file(
'path/to/file/in/repro/step/4/above',
open=True,
force=True
)
maya.standalone.uninitialize()
Stack trace:
TfileUtil::lockReference(TsceneFile*)
TloadReference::lockReference(TsceneFile*)
TloadReference::lockAllReferences(TsceneFile*)
TglobalTranslator::doReadFile(TsceneFile&, bool, bool)
TfileUtil::readFile(TsceneFile*, bool, bool, bool)
TsceneOperator::openFile(TsceneFile*, bool, bool)
TfileCmd::handleFileOpenFlag(TargDatabase&, TsceneFile*)
TfileCmd::handleFlags(TargDatabase&, TsceneFile*, TnamespaceSwapper*, TgraphDiff*)
TfileCmd::handleFlags(TargDatabase&, Tstring const&)
TfileCmd::doCommand(TargList&)
TpythonInterpreter::dispatchMayaCommand(TmetaCommand&, _object*, _object*)
PyEval_EvalFrameEx
PyEval_EvalCodeEx
PyEval_EvalCode
PyRun_FileExFlags
PyRun_SimpleFileExFlags
Py_Main
__libc_start_main
/<maya intall dir>/bin/python-bin() [0x400649]
All the calls starting with Py** at the bottom of the stack trace are standard Python C API functions.
Did anyone experience this? If yes it there a way around this (using mayapy). I could not find this in the know bugs.
For what it's worth -
This works flawlessly calling python from mel non-gui mode of maya binary for interactive non-gui mode.
maya -prompt -command "python(\"import maya.cmds as cmds;cmds.file(\\\"path/to/file/in/repro/step/4/above\\\", open=True, force=True)\");quit -f;"
|