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

test pyside6 QtWidgets qimage_test.py fails: segmentation fault

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 6.1.2
    • 6.1.1
    • Tooling
    • Linux/X11
    • 039776b1af905ab90ab49f6986214450e8099882

    Description

      While packaging pyside 6.1.1 for VoidLinux distribution, enabling provided self-testing fails:

      ```
      ...

      99% tests passed, 1 tests failed out of 443
      Total Test time (real) = 87.99 sec

      The following tests FAILED:
      335 - QtWidgets_qimage_test (SEGFAULT)
      Errors while running CTest
      FAILED: CMakeFiles/test.util
      ```

      Manually test with additional print statements:

      ```

      (chroot) $ export QT_QPA_PLATFORM=offscreen
      (chroot) $ export BUILD_DIR=/builddir/pyside-setup-opensource-src-6.1.1/sources/pyside6
      (chroot) $ export PYTHONPATH=/builddir/pyside-setup-opensource-src-6.1.1/sources/pyside6/build
      (chroot) $ cd /builddir/pyside-setup-opensource-src-6.1.1/sources/pyside6
      (chroot) $ python tests/QtWidgets/qimage_test.py -v

      testEmptyBuffer (_main_.QImageTest) ... QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yopito'
      (dbg) start testEmptyBuffer()
      (dbg) end testEmptyBuffer()
      ok
      testEmptyStringAsBuffer (_main_.QImageTest) ...
      (dbg) start testEmptyStringAsBuffer()
      (dbg) end testEmptyStringAsBuffer()
      ok
      testQImageStringBuffer (_main_.QImageTest)
      Test if the QImage signatures receiving string buffers exist. ...
      (dbg) start testQImageStringBuffer()
      (dbg) delete img1 ...

      Segmentation fault

      ```
      running from gdb with backtrace:
      ```
      (chroot)$ gdb -q --args python tests/QtWidgets/qimage_test.py
      Reading symbols from python...
      (No debugging symbols found in python)

      (gdb) run
      Starting program: /usr/bin/python tests/QtWidgets/qimage_test.py
      QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yopito'
      (dbg) start testEmptyBuffer()

      (dbg) end testEmptyBuffer()

      .(dbg) start testEmptyStringAsBuffer()

      (dbg) end testEmptyStringAsBuffer()

      .(dbg) start testQImageStringBuffer()

      (dbg) delete img1 ...

      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff7da020c in PyObject_GC_Del () from /lib/libpython3.9.so.1.0

      (gdb) bt
      #0 0x00007ffff7da020c in PyObject_GC_Del () from /lib/libpython3.9.so.1.0
      #1 0x00007ffff7cb5854 in ?? () from /lib/libpython3.9.so.1.0
      #2 0x00007ffff64d3266 in QImageData::~QImageData() () from /lib/libQt6Gui.so.6
      #3 0x00007ffff64d3328 in QImage::~QImage() () from /lib/libQt6Gui.so.6
      #4 0x00007ffff6c75fa9 in QImageWrapper::~QImageWrapper (this=0x555555bd1e60, __in_chrg=<optimized out>)
      at PySide6/QtGui/PySide6/QtGui/qimage_wrapper.cpp:365
      #5 QImageWrapper::~QImageWrapper (this=0x555555bd1e60, __in_chrg=<optimized out>)
      at PySide6/QtGui/PySide6/QtGui/qimage_wrapper.cpp:369
      #6 Shiboken::callCppDestructor<QImageWrapper> (cptr=0x555555bd1e60) at /usr/include/shiboken6/basewrapper.h:167
      #7 0x00007ffff744795b in ?? () from /lib/libshiboken6.so.6.1
      #8 0x00007ffff7c42615 in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #9 0x00007ffff7c3b8fb in ?? () from /lib/libpython3.9.so.1.0
      #10 0x00007ffff7c80f68 in ?? () from /lib/libpython3.9.so.1.0
      #11 0x00007ffff7c41894 in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #12 0x00007ffff7c3b8fb in ?? () from /lib/libpython3.9.so.1.0
      -Type <RET> for more, q to quit, c to continue without paging-c
      #13 0x00007ffff7c41eff in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #14 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #15 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #16 0x00007ffff7c80ed2 in ?? () from /lib/libpython3.9.so.1.0
      #17 0x00007ffff7c3dbe9 in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #18 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #19 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #20 0x00007ffff7c7e5b3 in _PyObject_FastCallDictTstate () from /lib/libpython3.9.so.1.0
      #21 0x00007ffff7c7e890 in _PyObject_Call_Prepend () from /lib/libpython3.9.so.1.0
      #22 0x00007ffff7cd7fa4 in ?? () from /lib/libpython3.9.so.1.0
      #23 0x00007ffff7c7e42d in _PyObject_MakeTpCall () from /lib/libpython3.9.so.1.0
      #24 0x00007ffff7c42f9b in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #25 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #26 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #27 0x00007ffff7c80ed2 in ?? () from /lib/libpython3.9.so.1.0
      #28 0x00007ffff7c3dbe9 in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #29 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #30 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #31 0x00007ffff7c7e5b3 in _PyObject_FastCallDictTstate () from /lib/libpython3.9.so.1.0
      #32 0x00007ffff7c7e890 in _PyObject_Call_Prepend () from /lib/libpython3.9.so.1.0
      #33 0x00007ffff7cd7fa4 in ?? () from /lib/libpython3.9.so.1.0
      #34 0x00007ffff7c7e42d in _PyObject_MakeTpCall () from /lib/libpython3.9.so.1.0
      #35 0x00007ffff7c42f9b in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #36 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #37 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #38 0x00007ffff7c80ed2 in ?? () from /lib/libpython3.9.so.1.0
      #39 0x00007ffff7c3dbe9 in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #40 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #41 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #42 0x00007ffff7c7e5b3 in _PyObject_FastCallDictTstate () from /lib/libpython3.9.so.1.0
      #43 0x00007ffff7c7e890 in _PyObject_Call_Prepend () from /lib/libpython3.9.so.1.0
      #44 0x00007ffff7cd7fa4 in ?? () from /lib/libpython3.9.so.1.0
      #45 0x00007ffff7c7e42d in _PyObject_MakeTpCall () from /lib/libpython3.9.so.1.0
      #46 0x00007ffff7c42f9b in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #47 0x00007ffff7c3b8fb in ?? () from /lib/libpython3.9.so.1.0
      #48 0x00007ffff7c41eff in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #49 0x00007ffff7c3b8fb in ?? () from /lib/libpython3.9.so.1.0
      #50 0x00007ffff7c41eff in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #51 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #52 0x00007ffff7c7e17d in _PyFunction_Vectorcall () from /lib/libpython3.9.so.1.0
      #53 0x00007ffff7c7e5b3 in _PyObject_FastCallDictTstate () from /lib/libpython3.9.so.1.0
      #54 0x00007ffff7c7e890 in _PyObject_Call_Prepend () from /lib/libpython3.9.so.1.0
      #55 0x00007ffff7cd80d4 in ?? () from /lib/libpython3.9.so.1.0
      #56 0x00007ffff7cd13ce in ?? () from /lib/libpython3.9.so.1.0
      #57 0x00007ffff7c7e42d in _PyObject_MakeTpCall () from /lib/libpython3.9.so.1.0
      #58 0x00007ffff7c44bce in _PyEval_EvalFrameDefault () from /lib/libpython3.9.so.1.0
      #59 0x00007ffff7d4316d in ?? () from /lib/libpython3.9.so.1.0
      #60 0x00007ffff7d434be in _PyEval_EvalCodeWithName () from /lib/libpython3.9.so.1.0
      #61 0x00007ffff7d4350e in PyEval_EvalCodeEx () from /lib/libpython3.9.so.1.0
      #62 0x00007ffff7d4353b in PyEval_EvalCode () from /lib/libpython3.9.so.1.0
      #63 0x00007ffff7d7f5da in ?? () from /lib/libpython3.9.so.1.0
      #64 0x00007ffff7d7f7e7 in ?? () from /lib/libpython3.9.so.1.0
      #65 0x00007ffff7d8225c in ?? () from /lib/libpython3.9.so.1.0
      #66 0x00007ffff7d823f6 in PyRun_SimpleFileExFlags () from /lib/libpython3.9.so.1.0
      #67 0x00007ffff7d9d4a0 in Py_RunMain () from /lib/libpython3.9.so.1.0
      #68 0x00007ffff7d9d986 in Py_BytesMain () from /lib/libpython3.9.so.1.0
      #69 0x00007ffff7f6d6fa in libc_start_main_stage2 (main=0x555555555060, argc=2, argv=0x7fffffffebb8) at src/env/__libc_start_main.c:94
      #70 0x000055555555507b in _start ()

      ```

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            yopito Pierre Bourgin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes