Details
Description
I've encounterd a weird bug in my program. I'm currently using PyQt5, and my program crash occasionally on startup (sometimes okay). There's no error message and I only got:
Process finished with exit code -1073741819 (0xC0000005)
Since my program is a bit complex, it's hard for me to reduce it to a minimal example. After some debugging, it seems that the program crashes when a wrapper widget is added to a QStackedWidget, but I can't figure out why.
So I tried to switch to PySide2, then the crash occasionally happens during import, before any of my codes are executed.
I've fixed the bug in my program in PyQt 5.12 now, the problem is a custom label inherited from QLabel used to display some HTML, but I still have no idea why this would cause crash occassionally. And I am not able to reproduce the issue after some testing. Not sure whether these two issues are related or not.
from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * print('pyside') import matplotlib.pyplot print('matplotlib')
When the order of import is reversed, the occasional crash goes away. I'm not sure whether this is PySide2's problem or matplotlib's. I'll try to also raise the issue on matplotlib's github repo.
Attachments
Issue Links
- is duplicated by
-
PYSIDE-943 segmentation fault when importing matplotlib.pyplot
- Closed
- relates to
-
PYSIDE-942 six.py SystemError in frozen apps that embed PySide2
- Closed
For Gerrit Dashboard: PYSIDE-937 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
254757,4 | Fix Refcounting Bug Shown By __doc__ Handling | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |