Page 1 of 1

mayapy crash

Posted: Tue Jan 31, 2017 7:54 pm
by selsner
I have a very weird issue.
We run "afrender" at system startup via the service that comes with afanasy. When executing the following command with afrender started this way, the mayapy executable segfaults:

Code: Select all

/usr/autodesk/maya2016/bin/mayapy -c "import pymel.core;import os;os._exit(0)"
When starting the afrender service manually on the command line the command above runs well.


the output of the crash is:

Code: Select all

terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Stack trace:
/lib64/libc.so.6() [0x39678326a0]
gsignal
abort
__gnu_cxx::__verbose_terminate_handler()
/usr/lib64/libstdc++.so.6() [0x396acbcbd6]
/usr/lib64/libstdc++.so.6() [0x396acbcc03]
/usr/lib64/libstdc++.so.6() [0x396acbcd22]
std::__throw_logic_error(char const*)
/usr/lib64/libstdc++.so.6() [0x396ac9ce59]
std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)
/usr/autodesk/maya2016/bin/../lib/libMC3.so.8(+0xb7330) [0x7fc8454f2330]
/usr/autodesk/maya2016/bin/../lib/libMC3.so.8(+0x139c7f) [0x7fc845574c7f]
/usr/autodesk/maya2016/bin/../lib/libMC3.so.8(+0xb7f69) [0x7fc8454f2f69]
CMLFacade::Initialize(CMLWaypoint*, wchar_t const*, wchar_t const*, wchar_t const*, int, unsigned int, long long, long long, MC3_MODE, wchar_t const*)
TCIPClient::initialize()
TCIPClient::TCIPClient()
TCIPClient::theOne()
TbaseApp::cipReportStartup()
TbaseApp::initGeneral()
TlibModeApp::initGeneral()
Tapplication::start()
libmain(char const*, bool, bool)
/usr/autodesk/maya2016/lib/python2.7/site-packages/maya/standalone.so(+0x14be) [0x7fc832f334be]
PyEval_EvalFrameEx
PyEval_EvalCodeEx
PyEval_EvalFrameEx
PyEval_EvalCodeEx
PyEval_EvalCode
PyImport_ExecCodeModuleEx
/usr/autodesk/maya2016/bin/../lib/libpython2.7.so.1.0(+0x1057d0) [0x7fc8604217d0]
/usr/autodesk/maya2016/bin/../lib/libpython2.7.so.1.0(+0x107492) [0x7fc860423492]
/usr/autodesk/maya2016/bin/../lib/libpython2.7.so.1.0(+0x105f87) [0x7fc860421f87]
/usr/autodesk/maya2016/bin/../lib/libpython2.7.so.1.0(+0x106431) [0x7fc860422431]
PyImport_ImportModuleLevel
/usr/autodesk/maya2016/bin/../lib/libpython2.7.so.1.0(+0xe60bd) [0x7fc8604020bd]
PyObject_Call
PyEval_CallObjectWithKeywords
PyEval_EvalFrameEx
PyEval_EvalCodeEx
PyEval_EvalCode


maybe someone has an idea?!

Re: mayapy crash

Posted: Tue Jan 31, 2017 9:31 pm
by timurhai
Hi.
May be some environment difference causes the error.
Try to print some environment variable.
Pay attention on PYTHON_HOME, PYTHON_PATH and LD_LIBRARY_PATH.

Re: mayapy crash

Posted: Tue Jan 31, 2017 9:32 pm
by timurhai
- topic should be in this section (moved here from general)

Re: mayapy crash

Posted: Tue Feb 07, 2017 6:08 pm
by selsner
For the record, this is solved by setting the env var:

Code: Select all

MAYA_DISABLE_CIP=1
taken from: http://lost-triangle.com/2016/09/05/ins ... ntu-16-04/

Re: mayapy crash

Posted: Tue Feb 07, 2017 9:40 pm
by timurhai