mayabatch.exe (through Render.exe) is crashing from PyQt4?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2013
mayabatch.exe (through Render.exe) is crashing from PyQt4?

This is my command

Quote: "C:\Program Files\Autodesk\Maya2013\bin\Render.exe" -r mr "C:\Users\USER\Desktop\test_render.mb

I am getting this error:

Quote: Starting "C:\Program Files\Autodesk\Maya2013\bin\mayabatch.exe"

pymel.core : INFO : Updating pymel with pre-loaded plugins: Fur, AbcImport, ddsFloatReader, mayaHIK, retargeterNode
PyQt4.uic.uiparser : DEBUG : UI version is 4.0
PyQt4.uic.uiparser : DEBUG : uiname is Form
PyQt4.uic.uiparser : DEBUG : toplevel widget is QWidget : DEBUG : setting property geometry : DEBUG : setting property windowTitle
PyQt4.uic.uiparser : DEBUG : push QWidget Form : DEBUG : setting property margin
PyQt4.uic.uiparser : DEBUG : push QGridLayout gridLayout_4 : DEBUG : setting property text
PyQt4.uic.uiparser : DEBUG : push QLabel label
PyQt4.uic.uiparser : DEBUG : pop widget QLabel label
PyQt4.uic.uiparser : DEBUG : new topwidget Form
PyQt4.uic.uiparser : DEBUG : push QGridLayout gridLayout_2
PyQt4.uic.uiparser : DEBUG : push QLineEdit lineEdit_renderCamera
PyQt4.uic.uiparser : DEBUG : pop widget QLineEdit lineEdit_renderCamera
PyQt4.uic.uiparser : DEBUG : new topwidget Form : DEBUG : setting property minimumSize : DEBUG : setting property maximumSize : DEBUG : setting property sizeIncrement
PyQt4.uic.uiparser : DEBUG : push QLineEdit lineEdit_outDirectory
PyQt4.uic.uiparser : DEBUG : pop widget QLineEdit lineEdit_outDirectory
PyQt4.uic.uiparser : DEBUG : new topwidget Form
PyQt4.uic.uiparser : DEBUG : pop layout QGridLayout gridLayout_2 : DEBUG : setting property horizontalSpacing
PyQt4.uic.uiparser : DEBUG : pop widget QWidget Form
PyQt4.uic.uiparser : DEBUG : new topwidget None addMenuItem: (kFailure): Unexpected Internal Failure // Maya exited with status -1073741819

Any thoughts what is happening here?

  02 February 2013
The call to "addMenuItem" is causing mayabatch to crash. Executing GUI specific code in mayabatch generally crashes Maya. This could be a plugin or a script that is being run during (e.g.

Take a look through your startup scripts for any code that may be trying to load or configure GUI elements in Maya. You can test if Maya is in batch mode and skip the code using the about MEL command:
about -batch

Last edited by zeroeffect : 02 February 2013 at 02:27 AM.
  02 February 2013
Thanks for your help!

How would I do this from the command line?


Are you suggesting I run this inside maya in GUI mode?

Thanks again!
  02 February 2013
Looking at your trace it looks like pymel.core is imported on startup. Do you use a (and/or userSetup.mel) file to configure Maya when it starts up? The GUI specific code would likely be contained in this file (assuming this is the problem) and need to be modified accordingly.

Once you've identified the GUI specific areas of code you can wrap them in an 'if' statement so that it isn't executed in batch mode:

import maya.cmds as cmds
# Check if Maya is not running batch mode
if not cmds.about(batch=True):
   # Run GUI specific code here
  02 February 2013
I disabled some py scriptedPlugins (turned off autoload) and now the mayabatch works...


I should rethink how those plugins load in the libraries needed. Should I put a a check in my scripted plugins to check for batch mode?
  02 February 2013
Originally Posted by t7200: I should rethink how those plugins load in the libraries needed. Should I put a a check in my scripted plugins to check for batch mode?

This one is really up to you. A plug-in shouldn't crash Maya when it is loaded in batch mode. If you have the time to go back through the code and update it this would be the best approach.

You can also utilize the -noAutoloadPlugins flag in mayabatch (not sure if it is available in the render.exe command though) and only load the plug-ins that are required to render the shot.

If you want to find out which plug-ins are causing problems you can run mayabatch in an interactive mode and load the plug-ins one-by-one.

mayabatch -noAutoloadPlugins -prompt

From the MEL prompt:
// List all plugins (should be empty)
pluginInfo -q -listPlugins;

// Load the plugin by name
loadPlugin pluginName;
  02 February 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:29 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.