我在Maya中使用PySide2
创建了一个带有QWebView
的小部件,该小部件将google.com加载到其showEvent
上。
作为独立工具,我可以在Maya之外毫无问题地运行它,但是在Maya内部,当我使用其load
方法时,它将立即崩溃。这很奇怪,因为在Maya崩溃时,我确实看到google已成功加载到我的小部件中。
我正在Centos 7上使用Maya 2018 Extension4。有人可以确认这也在您的计算机上崩溃吗?
这是我正在运行的脚本,每次都会崩溃:
from PySide2 import QtWidgets
from PySide2 import QtWebKitWidgets
class BrowserTool(QtWidgets.QWidget):
def __init__(self, parent=None):
super(BrowserTool, self).__init__(parent)
self.resize(800, 800)
self.web_view = QtWebKitWidgets.QWebView(parent=self)
self.main_layout = QtWidgets.QVBoxLayout()
self.main_layout.addWidget(self.web_view)
self.setLayout(self.main_layout)
def showEvent(self, event):
self.web_view.load("http://www.google.com")
tool = BrowserTool()
tool.show()
Maya从崩溃文件中弹出的内容是
//====================================================
//command history (most recent last):
//====================================================
//last tool: nurbsSelect
//====================================================
//panel with focus: scriptEditorPanel1
//visible panels:
// modelPanel4 outlinerPanel1 scriptEditorPanel1
//====================================================
/lib64/libc.so.6(+0x1617dc) [0x7f33f10707dc]
OBJ_bsearch_ex
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libcrypto.so.6(+0x7e125) [0x7f334111b125]
X509_OBJECT_retrieve_match
X509_STORE_add_cert
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xfd5dc) [0x7f33e4ddc5dc]
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0x100d9a) [0x7f33e4ddfd9a]
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0x103512) [0x7f33e4de2512]
QSslSocket::startClientEncryption()
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xeddb0) [0x7f33e4dccdb0]
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xf56d9) [0x7f33e4dd46d9]
QMetaObject::activate(QObject*, int, int, void**)
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xcea6b) [0x7f33e4dada6b]
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xd0b98) [0x7f33e4dafb98]
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Network.so.5(+0xd9165) [0x7f33e4db8165]
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libExtensionLayer.so(+0x1edc3c) [0x7f3400af0c3c]
QCoreApplication::notifyInternal2(QObject*, QEvent*)
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Core.so.5(+0x2c3bfe) [0x7f33f6489bfe]
g_main_context_dispatch
/lib64/libglib-2.0.so.0(+0x4a818) [0x7f33dc8b1818]
g_main_context_iteration
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
QThread::exec()
/Volumes/apps/x86_64/maya/2018_EXT4/lib/libQt5Core.so.5(+0xaa9d3) [0x7f33f62709d3]
/lib64/libpthread.so.0(+0x7e25) [0x7f33f12d9e25]
clone