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

Segmentation fault with 6.3.0 on garbage collection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.3.0
    • PySide
    • None
    • Linux/X11

    Description

      With the release of 6.3.0, we started getting segmentation faults during garbage collection. Our program uses a complicated UI involving user widgets and 3D visualization via VTK, so I don't have an easily reproducible minimal script available. However, here is a link to the failure:

       

      https://dev.azure.com/mne-tools/mne-python/_build/results?buildId=19137&view=logs&jobId=2b5832ae-6860-5681-a4e1-fd132048f8b4&j=2b5832ae-6860-5681-a4e1-fd132048f8b4&t=5b9d2bdb-d99e-53c3-c7bb-7166fe849ae1

       

      And the relevant text:

      mne/viz/_brain/tests/test_brain.py::test_brain_gc[pyvistaqt] PASSED [ 18%]Fatal Python error: Segmentation fault 
       
      Current thread 0x00007fd3ae76e740 (most recent call first): 
       Garbage-collecting 
       File "/home/vsts/work/1/s/mne/conftest.py", line 403 in garbage_collect 
       File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/fixtures.py", line 899 in _teardown_yield_fixture 
       File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/_pytest/fixtures.py", line 1012 in finish 
       

       
      Basically we have a test that does some 3D plots, then closes our UI, then runs `gc.collect`. This worked on 6.2.4, but on 6.3.0 now segfaults.
       
      When I try to reproduce locally, I actually get a segfault somewhere else (earlier than `test_brain_gc`), but I strongly suspect this is also due to garbage collection doing something bad somewhere.
       
      Notably, I do not have this issue on PySide6 6.2.4, or on PyQt6 6.3.0:

      PyQt6 6.3.0 -- Qt runtime 6.3.0 -- Qt compiled 6.3.0
      PySide6 6.2.4 -- Qt runtime 6.2.4 -- Qt compiled 6.2.4
      

      This suggests it's not due to Qt 6.3.0, but rather something specific to PySide 6.3.0's bindings.

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              larsoner Eric Larson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes