Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.13.0
-
None
-
Debian Linux inside Docker with Qt 5.13.0 installed via the official installer. Tried PySide2 from pip and built from source.
Description
When embedding Python/PySide2 into an existing Qt Application where the QtGuiApplication was created in C++ code before the "import PySide2" in python happens, the application crashes with a SIGSEGV.
Minimal example:
int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); Py_Initialize(); PyRun_SimpleString("from PySide2.QtCore import Slot, Qt\n"); }
Top of Stacktrace:
#0 0x00007fd761ee2b90 in PyObject_GetAttrString () from /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0 #1 0x00007fd751d67067 in NotifyModuleForQApp () from /usr/local/lib/python3.7/dist-packages/shiboken2/libshiboken2.cpython-37m-x86_64-linux-gnu.so.5.13 #2 0x00007fd751b1e30a in PyInit_QtCore () from /usr/local/lib/python3.7/dist-packages/PySide2/QtCore.cpython-37m-x86_64-linux-gnu.so #3 0x00007fd761e36a93 in _PyImport_LoadDynamicModuleWithSpec () from /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0
The backtrace is huge with PyInit_QtCore and NotifiyModuleForQApp repeated over and over again. Might we an infinite loop that results in the crash.
Attachments
Issue Links
- relates to
-
PYSIDE-1093 staticMetaObjects disappear when using QApplication.instance()
- Closed