Build PySide2 5.15.5 with --debug fails with access violation or assert
-
I am building PySide2 from the 15.5.5 distribution using python 3.8.12, QT 15.5.5, LLVM 14.0.0, Visual Studio 2019 64 bit build environment.
I am trying to build the "debug" distribution using the --debug flag
Release distributions build finec:\python38\python setup.py install --make-spec=ninja --qmake=D:\Qt\5.15.5\msvc2019_64\bin\qmake.exe --debug ... [239/1628] PySide2\QtCore\CMakeFiles\QtCore_pyi-1ab71c6.bat b2bcd5d5ffdda579 FAILED: PySide2/QtCore/CMakeFiles/QtCore_pyi C:/Users/vaone/Downloads/pyside-setup-opensource-src-5.15.5/pyside3d_build/py3.8-qt5.15.5-64bit-debug/pyside2/PySide2/QtCore/CMakeFiles/QtCore_pyi PySide2\QtCore\CMakeFiles\QtCore_pyi-1ab71c6.bat b2bcd5d5ffdda579 Access violation Batch file failed at line 3 with errorcode 1
Or it has failed on our CI system at the identical point with the error
C:.conan\data\cpython\3.8.12__\build\d350fa01c3d65b3e29afda6232a037959e8ec037\source_subfolder\Modules\gcmodule.c:110: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small -
Sorry for my typos in my OP , I obviously mean QT 5.15.5 not QT 15.5.5 ( getting ahead of ourselves there!)
In the debug build, which uses python_d I get the following error
C:.conan\data\cpython\3.8.12__\build\d350fa01c3d65b3e29afda6232a037959e8ec037\source_subfolder\Modules\gcmodule.c:110: gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small
Enable tracemalloc to get the memory block allocation traceback
object address : 00000258A233B5D0
object refcount : 48
object type : 00007FFA21157610
object type name: type
object repr : <class 'Shiboken.Enum'>
Fatal Python error: _PyObject_AssertFailed
Python runtime state: initializedI have tested PySide2 5.15.2 and it builds fine.
-
Hi again loopless, sorry for getting back to you so late. I'm actually struggling myself to build PySide 2 on Windows (running into different problems, though) so trying to reproduce this has been challenging.
In the meantime, may I suggest that you
a) try with a newer Qt version like 5.15.10
b) try with a newer Python version like Python 3.10and see what happens?