qtpy icon indicating copy to clipboard operation
qtpy copied to clipboard

Crash when importing QtCore with PySide 6.8

Open maflAT opened this issue 1 year ago • 5 comments
trafficstars

With PySide 6.8.0 installed, qtpy will crash without raising an Exception when importing QtCore from qtpy. The crash happens in "./qtpy/QtCore.py", line 128: from PySide6.QtCore import *.

maflAT avatar Oct 11 '24 13:10 maflAT

Hey @maflAT, thanks for reporting. This seems similar to issue #480, in the sense that PySide 6.8 seems to have broken star imports again (i.e. imports of the form from PySide6.QtCore import *).

Since Qtpy is simply a wrapper around PyQt and PySide, there's nothing we can do about it. Instead, please report this problem in the Qt bug tracker and kindly ask them to run our test suite before releasing a new minor version to avoid this problem in the future.

ccordoba12 avatar Oct 11 '24 15:10 ccordoba12

xref: https://bugreports.qt.io/browse/PYSIDE-2888

hmaarrfk avatar Oct 11 '24 22:10 hmaarrfk

Note that the crash is a CPython crash, i.e. an access violation (exit code 0xC0000005) on windows, i.e.;

import qtpy.QtCore

crashes with 0xC0000005 and;

import PySide6.QtCore

exits normally with exit code 0.

See attached test.bat file.

This bat file outputs;

Python 3.11.9
packaging==24.1
PySide6==6.8.0
PySide6_Addons==6.8.0
PySide6_Essentials==6.8.0
QtPy==2.4.1
shiboken6==6.8.0
QtPy exit code: -1073741819
PySide6 exit code: 0

test.zip

owillebo avatar Oct 12 '24 18:10 owillebo

My guess is that the 6.8.0.1 from pypi resolved things they released it today.

On conda-forge we also released a backport though we called it 6.8.0 build 1 https://github.com/conda-forge/pyside2-feedstock/pull/249

Upstream seems to have added a test for star imports too.

hmaarrfk avatar Oct 16 '24 00:10 hmaarrfk

In the fact the bug report I originally opened refers to 6.8.0.1 as having the fix: https://bugreports.qt.io/browse/PYSIDE-2888

hmaarrfk avatar Oct 16 '24 00:10 hmaarrfk

Closing since I think there is not much from the QtPy side to do for this and also PR #523 adds Qt 6.8 to the CI matrix and seems like things are passing

dalthviz avatar Nov 18 '25 22:11 dalthviz