Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.2, 6.1.1
-
None
-
Python 3.8.5 or Python 3.7.3
PySide6 6.1.1 within virtualenv
Windows 10 or Debian 10
-
-
98aef951920641dcdf4c217a0c51626cdf82caf8 (pyside/pyside-setup/dev) 10763c7a0c97b6b51ddd4fb8255b90a7897e22ff (pyside/pyside-setup/6.1) 525aa59e3871dccc0ffe6b1cb6441605e3635132 (pyside/tqtc-pyside-setup/5.15)
Description
When using findChild and StateMachine in the specified version, the app will eventually crash. In the example case the segfault is at app exit, but in the original case that led to this issue it would happen semi-randomly during execution after the call to findChild.
This may also exist in PySide2, since I got a similar crash there with the same code.
To reproduce:
- Run the attached tiny.py alongside tiny.qml. You will get a blank window and 'None' printed to the console from findChild.
- Close the window. On exit, the application will segfault.
The resulting output, when running with '-X faulthandler':
Windows fatal exception: access violation Current thread 0x0000896c (most recent call first): <no Python frame> Segmentation fault
This appears to be the combination of findChild and StateMachine. If either of these two is not present, the app does not segfault. For example, comment out line 13 of tiny.py and the app will not segfault.
Attachments
For Gerrit Dashboard: PYSIDE-1609 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
357210,6 | PySide6: Fix crashes in QObject.findChild() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
357227,4 | PySide6: Add a test for QObject.findChildren() by type | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
357292,2 | PySide6: Add a test for QObject.findChildren() by type | 6.1 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
357293,2 | PySide6: Fix crashes in QObject.findChild() | 6.1 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
357294,3 | PySide6: Add a test for QObject.findChildren() by type | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |
357295,3 | PySide6: Fix crashes in QObject.findChild() | tqtc/lts-5.15 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |