Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Build PySide2 5.15.5 with --debug fails with access violation or assert
QtWS25 Last Chance

Build PySide2 5.15.5 with --debug fails with access violation or assert

Scheduled Pinned Locked Moved Unsolved Qt for Python
pyside2
4 Posts 3 Posters 610 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    loopless
    wrote on 1 Sept 2022, 19:42 last edited by
    #1

    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 fine

    c:\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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adrianghc
      wrote on 2 Sept 2022, 19:04 last edited by
      #2

      Hi loopless, could you try the debug build of PySide with a debug build of Python instead of release? Since you're on Windows, the debug build executable of Python should be called python_d.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AndrewCQT
        wrote on 4 Sept 2022, 23:22 last edited by AndrewCQT 9 Apr 2022, 23:34
        #3

        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: initialized

        I have tested PySide2 5.15.2 and it builds fine.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adrianghc
          wrote on 14 Sept 2022, 11:14 last edited by
          #4

          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.10

          and see what happens?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved