[PySide] Python 3.12 segfault

Stephen Medina stephen at lilmail.xyz
Sat May 18 00:31:34 CEST 2024


Hello all,

On Linux I am getting "Segmentation fault (core dumped)" when I run the simple Qt Widget app at https://doc.qt.io/qtforpython-6/quickstart.html. This happens on Python 3.12.3 and the most recent versions of PySide6. It does not happen on Python 3.11.9. Using pystack, I get this from the core dump:


Core file information:
state: R zombie: True niceness: 0
pid: 1452902 ppid: 1451731 sid: 1451731
uid: 1000 gid: 1000 pgrp: 1452902
executable: python arguments: python test.py 

The process died due a segmentation fault accessing address: 0xa8
Traceback for thread 1452902 [Has the GIL] (most recent call last):
    (Python) File "/home/dev/src/test.py", line 3, in <module>
        from PySide6 import QtCore, QtWidgets, QtGui
    (Python) File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    (Python) File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
    (Python) File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
    (Python) File "<frozen importlib._bootstrap_external>", line 995, in exec_module
    (Python) File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    (Python) File "/home/dev/src/venv/dev12/lib64/python3.12/site-packages/PySide6/__init__.py", line 124, in <module>
        _setupQtDirectories()
    (Python) File "/home/dev/src/venv/dev12/lib64/python3.12/site-packages/PySide6/__init__.py", line 64, in _setupQtDirectories
        from shiboken6 import Shiboken
    (Python) File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    (Python) File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
    (Python) File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
    (Python) File "<frozen importlib._bootstrap_external>", line 995, in exec_module
    (Python) File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    (Python) File "/home/dev/src/venv/dev12/lib64/python3.12/site-packages/shiboken6/__init__.py", line 27, in <module>
        from shiboken6.Shiboken import *
    (Python) File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    (Python) File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
    (Python) File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
    (Python) File "<frozen importlib._bootstrap>", line 813, in module_from_spec
    (Python) File "<frozen importlib._bootstrap_external>", line 1289, in create_module
    (Python) File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed


Any suggestions on how to debug?

-Stephen





More information about the PySide mailing list