Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2632

Returning a Python tuple from @QtCore.Slot(result=QtCore.QObject) causes a segfault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • 6.6.2
    • PySide, Shiboken
    • None
    • Tested on x86_64 MacOS and Linux as well as aarch64 Linux. All tests were using a venv, installing PySide6 through pip.
    • Linux/Wayland, macOS

    Description

      Here is an example application that exhibits this behavior: https://github.com/dylanchapell/pyside6-segfault-demo-dylanchapell

      The offending code is bad_fn in Bad.py, which is declared as @QtCore.Slot(result=QtCore.QObject) and returns a python tuple of strings.

      Here is the error when run in GDB: 

      Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
      0x0000ffffe97daeec in Shiboken::Object::cppPointer(SbkObject*, _typeobject*) ()
         from /home/dylanchapell/Documents/Team Software/segfault_test/venv-312/lib64/python3.12/site-packages/shiboken6/libshiboken6.abi3.so.6.6 

      Here is a link to a core dump. This dump is from an aarch64 Fedora machine, but I have reproduced this on x86_64 Ubuntu and MacOS.

      [^pyside6-dump]

      Attachments

        1. pyside2632.zip
          1 kB
        2. pyside2632_stack.txt
          67 kB
        3. pyside2632_diag.diff
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            dylanchapell Dylan Chapell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes