Maya 2019: Crash running plugin on MPlug::SetValue() call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When running a plugin I am creating, I experience a crash with the error:
"Fatal Error. Attempting to save"
And this happens on MPlug::SetValue(), the line where this function is called so I have no returned MStatus to inspect.
The attribute's type is kMesh, and the passed MObject also has the type kMesh. If the operation simply failed that would be one thing, but crashing Maya entirely is concerning... if anyone has any suggestion of what could possibly be causing this I would appreciate that very much!
Where the call is made:
MStatus status;
MFnDependencyNode depNodeFn(modifierNode);
MPlug morphMeshPlug = depNodeFn.findPlug("morphMesh", true, &status);
MCheckStatus(status, "ERROR failed to find \"morphMesh\" plug");
MessageBox(NULL, "About to setValue", "Debug", MB_OK);
status = morphMeshPlug.setValue(m_morphObject);
MCheckStatus(status, "ERROR morphMeshPlug.setValue() failed")
MessageBox(NULL, "FINISH initModifierNode", "Debug", MB_OK);
return status;
Where the attribute is created on the node:
m_morphMesh = attrFn.create("morphMesh", "mm", MFnMeshData::kMesh);
attrFn.setStorable(true);
status = addAttribute(m_morphMesh);
if (!status)
{
status.perror("addAttribute");
return status;
}
Stack trace:
Foundation.dll!TdataLetter::reference
Foundation.dll!Tdata::Tdata
OpenMaya.dll!Autodesk::Maya::OpenMaya20190000::MPlug::setValue
MorphTargetUVPacker.mll!<7FFA87A44CAB>
MorphTargetUVPacker.mll!uninitializePlugin
MorphTargetUVPacker.mll!<7FFA87A4494D>
OpenMaya.dll!THcommandObject::doIt
CommandEngine.dll!TmetaCommand::doCommand
CommandEngine.dll!TmetaCommandPtrArray::catenate
CommandEngine.dll!melScanDouble
CommandEngine.dll!TminMelArgList::nextDigit
CommandEngine.dll!TminMelArgList::nextDigit
CommandEngine.dll!SophiaExecutable::evaluate
CommandEngine.dll!TcommandEngine::executeCommand
ExtensionLayer.dll!TscriptAction::execute
ExtensionLayer.dll!Taction::performAction
ExtensionLayer.dll!Taction::doIt
Qt5Core.dll!QMetaObject::activate
Qt5Widgets.dll!QAbstractButton::clicked
Qt5Widgets.dll!QAbstractButton::click
Qt5Widgets.dll!QAbstractButton::mouseReleaseEvent
Qt5Widgets.dll!QWidget::event
Qt5Widgets.dll!QApplicationPrivate::notify_helper
Qt5Widgets.dll!QApplication::notify
ExtensionLayer.dll!TwindowManager::windowPreferencesAreEnabled
Qt5Core.dll!QCoreApplication::notifyInternal2
Qt5Widgets.dll!QApplicationPrivate::sendMouseEvent
Qt5Widgets.dll!QSizePolicy::QSizePolicy
Qt5Widgets.dll!QSizePolicy::QSizePolicy
Qt5Widgets.dll!QApplicationPrivate::notify_helper
Qt5Widgets.dll!QApplication::notify
ExtensionLayer.dll!TwindowManager::windowPreferencesAreEnabled
Qt5Core.dll!QCoreApplication::notifyInternal2
Qt5Gui.dll!QGuiApplicationPrivate::processMouseEvent
Qt5Gui.dll!QWindowSystemInterface::sendWindowSystemEvents
Qt5Core.dll!QEventDispatcherWin32::processEvents
USER32.dll!CallWindowProcW
USER32.dll!DispatchMessageW
Qt5Core.dll!QEventDispatcherWin32::processEvents
qwindows.dll!qt_plugin_query_metadata