mayapy crashing when done

499 views
Skip to first unread message

Erik Johansson-Evegård

unread,
May 14, 2014, 7:10:54 AM5/14/14
to python_in...@googlegroups.com
Hi People

Some of our artists are having issues with mayapy crashing after it is done with the script.

maya encountered a fatal error Signal: 11 (Unknown Signal)
Stack trace:
/lib64/libc.so.6() [0x344b832900]
/usr/autodesk/maya2014-x64/bin/../lib/libpython2.7.so.1.0(+0x10e1b3) [0x7fcf7ac3e1b3]
PyGILState_Ensure
TpythonLock::initLock(TpythonLock::TpythonLockingInfo)
TpythonObjectWithLock<TpythonLock>::~TpythonObjectWithLock()
TscriptAction::~TscriptAction()
std::tr1::unordered_map<std::string, TprepareRenderCmd::RegistryEntry, std::tr1::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, TprepareRenderCmd::RegistryEntry> >, false>::~unordered_map()
exit
__libc_start_main
/usr/autodesk/maya2014-x64/bin/python-bin() [0x400619]


Anyone got some idea on where to start digging?

Cheers,
Erik

Marcus Ottosson

unread,
May 14, 2014, 7:30:06 AM5/14/14
to python_in...@googlegroups.com
Hi Erik,

Could you provide a minimal example which reproduces this error?

Best,
Marcus


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c093edf8-b581-431d-87fd-2b64eb378727%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Erik Johansson-Evegård

unread,
May 14, 2014, 10:16:46 AM5/14/14
to python_in...@googlegroups.com
Sure.

It can be something as simple as:

test.py
import maya.standalone
maya.standalone.initialize()
import maya.cmds as mc
mc.file(options.filename, o=True)
mc.quit(force=True)

 
mayapy test.py

Have found some xgen errors in the logs for the people where it don't work so gonna look further into that. Still feels weird that it should crash because of that when the scene dont contain any xgen stuff.

Cheers,
Erik
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

Justin Israel

unread,
May 14, 2014, 3:37:11 PM5/14/14
to python_in...@googlegroups.com

Maybe it is the force quit using the Maya command. Its possible that it is doing some faulty shutdown logic when it is not running in the GUI.
Do you get the error if you just exit with sys.exit()?

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ab366ba7-fd6a-4824-87d3-0d0d1b2191a9%40googlegroups.com.

Erik Johansson-Evegård

unread,
May 14, 2014, 3:40:05 PM5/14/14
to python_in...@googlegroups.com
Same error with sys.quit() and just not doing anything at all.

Good news tho. It is when xgen is loaded it crashes. Guess that is one to pass along to autodesk.

Cheers,
Erik
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Colas Fiszman

unread,
May 14, 2014, 5:07:29 PM5/14/14
to python_in...@googlegroups.com
usually i'm doing running that at the end of my mayapy script to avoid any crashing or hanging
cmds.file(new=True, force=True)
os._exit(0)


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e9d903d2-b228-4711-9998-70f2b7635311%40googlegroups.com.

Justin Israel

unread,
May 14, 2014, 5:23:41 PM5/14/14
to python_in...@googlegroups.com
I actually just encountered a similar situation with a Qt app, where at shutdown randomly it would seg fault because of some mismatches in the garbage collection vs what Qt had already destroyed. I've added the os._exit() approach to my shutdown routine to avoid problem. 



Erik Johansson-Evegård

unread,
Jun 12, 2014, 11:33:50 AM6/12/14
to python_in...@googlegroups.com
Think I forgot to say thanks for:
cmds.file(new=True, force=True)
os._exit(0)

Works great. No more crazy errors.

Cheers,
Erik


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/jrBR36juX2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1JqaaDbCE3B3%3DQ2gQgEbGMW%2BN67U1RPWNMrGXw0-VFWA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages