pyblish / pyblish-qml

Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
GNU Lesser General Public License v3.0
114 stars 44 forks source link

Serious crashing in Maya 2016 in CentOS Linux with pyblish-qml 1.8.2 onwards #308

Closed darkvertex closed 5 years ago

darkvertex commented 6 years ago

(My bad for not catching this earlier. I just hadn't updated to the newer versions at the studio yet.)

I have a suspicion there's something funky going on with the eventfilter stuff. 1.8.1 and earlier all work flawlessly for me, in both Maya 2016 and 2018.

However, 1.8.2+ all explode just after beginning to draw the window, after the splash screen, in Maya 2016 only. Maya 2018 appears to be stable.

With the latest pyblish-base, I tried every version of pyblish-qml from 1.8.0 to 1.8.7. Here's some crash stacktraces, for what it's worth:

Maya 2016 with pyblish-qml==1.8.2:

QWidget::updateFrameStrut: No parent
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Stack trace:
  /lib64/libpthread.so.0(+0xf5e0) [0x7fa592b375e0]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7fa592793266]
  /lib64/libc.so.6(+0x2e312) [0x7fa592793312]
  /lib64/libX11.so.6(+0x42712) [0x7fa595579712]
  /lib64/libX11.so.6(+0x427c6) [0x7fa5955797c6]
  _XEventsQueued
  XEventsQueued
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bf95c) [0x7fa5972fc95c]
  g_main_context_check
  /lib64/libglib-2.0.so.0(+0x4a730) [0x7fa5816ff730]
  g_main_context_iteration
  QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bf87e) [0x7fa5972fc87e]
  QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
  QCoreApplication::exec()
  Tapplication::start()
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/bin/maya.bin() [0x40e8af]
  main
  __libc_start_main
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/bin/maya.bin() [0x40e06d]

maya.bin: Fatal IO error: client killed
Segmentation fault (core dumped)

and

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Stack trace:
  /lib64/libpthread.so.0(+0xf5e0) [0x7f1ad7ccd5e0]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7f1ad7929266]
  /lib64/libc.so.6(+0x2e312) [0x7f1ad7929312]
  /lib64/libX11.so.6(+0x4229c) [0x7f1ada70f29c]
  _XReply
  XQueryTree
  QWidgetPrivate::updateFrameStrut()
  QWidgetPrivate::frameStrut() const
  QWidget::pos() const
  TwindowManager::addWindowPreference(QObject*)
  QmayaWindowEventFilterObject::processAppDeactivateEvent()
  QmayaWindowEventFilterObject::eventFilter(QObject*, QEvent*)
  QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*)
  QApplicationPrivate::notify_helper(QObject*, QEvent*)
  QApplication::notify(QObject*, QEvent*)
  QmayaApplication::notify(QObject*, QEvent*)
  QCoreApplication::notifyInternal(QObject*, QEvent*)
  QApplication::setActiveWindow(QWidget*)
  QWidgetPrivate::deactivateWidgetCleanup()
  QWidgetPrivate::hide_sys()
  QWidgetPrivate::hide_helper()
  QWidget::setVisible(bool)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7927f5) [0x7f1a366a77f5]
  QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7886d8) [0x7f1a3669d6d8]
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f1ad63841a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f1ad63841a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f1ad63841a2]
  PyObject_Call
  PyEval_EvalFrameEx

Maya 2016 with pyblish-qml==1.8.4:

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
QWidget::updateFrameStrut: No parent
Stack trace:
  /lib64/libpthread.so.0(+0xf5e0) [0x7f8d68c345e0]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7f8d68890266]
  /lib64/libc.so.6(+0x2e312) [0x7f8d68890312]
  /lib64/libX11.so.6(+0x4229c) [0x7f8d6b67629c]
  /lib64/libX11.so.6(+0x427b4) [0x7f8d6b6767b4]
  _XEventsQueued
  XEventsQueued
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bf9c7) [0x7f8d6d3f99c7]
  g_main_context_prepare
  /lib64/libglib-2.0.so.0(+0x4a6b8) [0x7f8d577fc6b8]
  g_main_context_iteration
  QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bf87e) [0x7f8d6d3f987e]
  QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
  QCoreApplication::exec()
  Tapplication::start()
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/bin/maya.bin() [0x40e8af]
  main
  __libc_start_main
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/bin/maya.bin() [0x40e06d]

maya.bin: Fatal IO error: client killed
Segmentation fault (core dumped)

Maya 2016 with pyblish-qml==1.8.5:

QWidget::updateFrameStrut: No parent
maya.bin: Fatal IO error: client killed
Segmentation fault (core dumped)

Maya 2016 with pyblish-qml==1.8.6:


[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Stack trace:
  /lib64/libpthread.so.0(+0xf5e0) [0x7f36ff6285e0]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7f36ff284266]
  /lib64/libc.so.6(+0x2e312) [0x7f36ff284312]
  /lib64/libX11.so.6(+0x4229c) [0x7f370206a29c]
  _XReply
  XQueryTree
  QWidgetPrivate::updateFrameStrut()
  QWidgetPrivate::frameStrut() const
  QWidget::pos() const
  TwindowManager::addWindowPreference(QObject*)
  QmayaWindowEventFilterObject::processAppDeactivateEvent()
  QmayaWindowEventFilterObject::eventFilter(QObject*, QEvent*)
  QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*)
  QApplicationPrivate::notify_helper(QObject*, QEvent*)
  QApplication::notify(QObject*, QEvent*)
  QmayaApplication::notify(QObject*, QEvent*)
  QCoreApplication::notifyInternal(QObject*, QEvent*)
  QApplication::setActiveWindow(QWidget*)
  QWidgetPrivate::deactivateWidgetCleanup()
  QWidgetPrivate::hide_sys()
  QWidgetPrivate::hide_helper()
  QWidget::setVisible(bool)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7927f5) [0x7f365e1227f5]
  QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7886d8) [0x7f365e1186d8]
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f36fdcdf1a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f36fdcdf1a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f36fdcdf1a2]
  PyObject_Call
  PyEval_EvalFrameEx

Maya 2016 with pyblish-qml==1.8.7:


[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Stack trace:
  /lib64/libpthread.so.0(+0xf5e0) [0x7ff5dc5b35e0]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7ff5dc20f266]
  /lib64/libc.so.6(+0x2e312) [0x7ff5dc20f312]
  /lib64/libX11.so.6(+0x4229c) [0x7ff5deff529c]
  _XReply
  XTranslateCoordinates
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidgetPrivate::mapFromGlobal(QPoint const&) const
  QWidget::mapFromGlobal(QPoint const&) const
  QApplication::notify(QObject*, QEvent*)
  QmayaApplication::notify(QObject*, QEvent*)
  QCoreApplication::notifyInternal(QObject*, QEvent*)
  QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x29747b) [0x7ff5e0d5047b]
  QApplication::x11ProcessEvent(_XEvent*)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bfce2) [0x7ff5e0d78ce2]
  g_main_context_dispatch
  /lib64/libglib-2.0.so.0(+0x4a818) [0x7ff5cb17b818]
  g_main_context_iteration
  QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libQtGui.so.4(+0x2bf87e) [0x7ff5e0d7887e]
  QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
  QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
  QCoreApplication::exec()
  Tapplication::start()

and another dump:

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Stack trace:
  /lib64/libc.so.6(+0x35270) [0x7f9ce8dab270]
  gsignal
  abort
  /lib64/libc.so.6(+0x2e266) [0x7f9ce8da4266]
  /lib64/libc.so.6(+0x2e312) [0x7f9ce8da4312]
  /lib64/libX11.so.6(+0x4229c) [0x7f9cebb8a29c]
  _XReply
  XQueryTree
  QWidgetPrivate::updateFrameStrut()
  QWidgetPrivate::frameStrut() const
  QWidget::pos() const
  TwindowManager::addWindowPreference(QObject*)
  QmayaWindowEventFilterObject::processAppDeactivateEvent()
  QmayaWindowEventFilterObject::eventFilter(QObject*, QEvent*)
  QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*)
  QApplicationPrivate::notify_helper(QObject*, QEvent*)
  QApplication::notify(QObject*, QEvent*)
  QmayaApplication::notify(QObject*, QEvent*)
  QCoreApplication::notifyInternal(QObject*, QEvent*)
  QApplication::setActiveWindow(QWidget*)
  QWidgetPrivate::deactivateWidgetCleanup()
  QWidgetPrivate::hide_sys()
  QWidgetPrivate::hide_helper()
  QWidget::setVisible(bool)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7927f5) [0x7f9b2af5f7f5]
  QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode)
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/python2.7/site-packages/PySide/QtGui.so(+0x7886d8) [0x7f9b2af556d8]
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f9ce77ff1a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f9ce77ff1a2]
  PyObject_Call
  PyEval_EvalFrameEx
  PyEval_EvalCodeEx
  /softwareLocal/maya/linux/Maya2016SP6/maya2016-x64/lib/libpython2.7.so.1.0(+0x741a2) [0x7f9ce77ff1a2]
  PyObject_Call
  PyEval_EvalFrameEx

I'm on CentOS Linux release 7.4.1708, Maya 2016SP6.

I know what you're thinking... "Why the hell are they still on Maya 2016?"... lol.. Well, we're just beginning to upgrade but there's a few shows still going in 2016SP6.

Does the stack tell you anything?

To make it crash I just open the UI by script with the Script Editor without any Pyblish plugins or anything. When it works, it shows a ready UI with no plugins or instances. When it doesn't, I get a window with black, splash screen stays open and Maya crashes.

Curiously, it usually makes it all the way to "ready" before crapping out: image

For now I'm just going to avoid using 1.8.2+ with Maya 2016, but it's too bad because I really wanted to use the "category" feature introduced in 1.8.6. :(

davidlatwe commented 6 years ago

Hi Alan, sorry for the inconvenient, CentOS only tested with Maya 2017 :(

Did you enable foster mode ? How do you launch pyblish-qml ? I'll get a CentOS and have a look this weekend :)

darkvertex commented 6 years ago

I did not enable foster mode, it's all the defaults.

How I launch pyblish-qml is unfortunately too specific and tied to the way we work at the studio...

Short answer: I provide pyblish-qml a path to a python executable whose environment has PyQt5.6 and the pyblish pip packages under Python 2.7.13.

Long answer: We use Rez for packaging everything, plus we have a few more features like proper pip support. Anyway, we have a rez pkg of PyQt5.6 and my pyblish-qml rez pkg uses pyblish_qml.api.register_python_executable() (before showing a UI) pointing to a shell script that basically does rez-env python-2 pyqt-5 -P pyblish_base==1.7.2 -P pyblish_qml==1.8.7 -- python, putting the UI in the perfect env on the fly with pip-provided pyblish-base and pyblish-qml, with our PyQt5.6 rez pkg and Python 2.7.x. Works great, usually.

davidlatwe commented 6 years ago

Thanks for the info! I'll test against those versions. :)

darkvertex commented 6 years ago

To be extra specific:

The PyQt5 I'm using is for Qt 5.6.1, with sip 4.18.1, manually compiled at the studio.

Maya 2016 is on Qt 4.8.6, says Autodesk docs. (Maybe some of the newer pyblish-qml code that runs on the DCC side is not PyQt4-friendly?)

davidlatwe commented 6 years ago

Maybe some of the newer pyblish-qml code that runs on the DCC side is not PyQt4-friendly?

Could be, possible something related to how I implement the eventFilter's removal. :disappointed: But I don't think it's not friendly to PyQt4, because I have Maya 2016 ext1 sp6 (on Windows) working here, too. :persevere:

davidlatwe commented 6 years ago

Hi @darkvertex , I just got everything installed and compiled, on CentOS 7.4.1708 (VM, on hyper-v)

But I launched pyblish-qml without crash :O

pyblish-qml-on-centos7

Could it be other reason ?

davidlatwe commented 6 years ago

Could you try this branch (noflag) ?

That branch reverted commit 2a69568, which might be the most Qt eventFilter related change between 1.8.1 and 1.8.2. ( verison compare )

Although I could not reproduce the problem to test it, but let's see if this would made a difference on your side. 🤞

davidlatwe commented 6 years ago

Sorry, @darkvertex , I just reproduced the exact error you had now.

I did not change anything what I had in my environment, I just relaunching Maya and pyblish-qml a few more times and the error pops. Turns out it's not happening every time, but the chance is high.

:(

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
maya.bin: xcb_io.c:165: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

Based on above lines' google result, it looks like something to do with Linux X11's threading.., since Maya 2016-18 all works fine so far on Windows, and only Maya 2016 on Linux has this unstable issue. But honestly I can not for sure.

I'll try to solve the issue in next few days. Thanks for reporting this !

davidlatwe commented 6 years ago

Progress update, I have spot the problem, but needs a few more day to work on it. Thanks in advance :)

mottosso commented 6 years ago

Thanks @davidlatwe for your hard work on this!

darkvertex commented 6 years ago

Yes, thank you so much for your efforts, @davidlatwe! I appreciate your proactiveness.

davidlatwe commented 5 years ago

This one should be long gone after PR #312 !

davidlatwe commented 5 years ago

Closing this now, since I have tested on Linux with PR #312 (v1.9.0) without any crash. :)

darkvertex commented 5 years ago

Hi @davidlatwe and @mottosso, my dearest apologies for not following up on this while it was being fixed / looked at. In mid-December and the months leading up to it, I sold a condo to buy a new house and the whole sale, big move, visits and paperwork completely monopolized my attention throughout the holidays. (All fine now though!)

Coming into this late, I'm very sorry for missing the chance to test your bugfix branches, but I'm however delighted that the foster feature was chosen to be removed as that will result in a more stable product for everyone. Thank you for your time on addressing this, @davidlatwe, I appreciate it.

davidlatwe commented 5 years ago

Hi @darkvertex No problem at all :) And congrats on the new house !