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

Multiple Inheritance segfault on PyPySide

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.3
    • PySide
    • None
    • pypy3.8
    • All

    Description

      Hello PySide team,

       

      This bug report is specific to PyPySide, the tests here 

       

      from PySide6 import QtCore
      
       class Mixin:
           def __init__(self):
               print('Mixin.__init__')
      
       class Object(QtCore.QObject):
           def __init__(self):
               print('Object.__init__')
               QtCore.QObject.__init__(self)
      
       class Right(Object, Mixin):
           def __init__(self):
               Object.__init__(self)
               Mixin.__init__(self)
      
       class Left(Mixin, Object):
           def __init__(self):
               Object.__init__(self)
               Mixin.__init__(self)
      
       def test_right_mixin():
           x = Right()
      
       def test_left_mixin():
           x = Left()
      
       if __name__ == '__main__':
           print('Right')
           Right()
           print('Left')
           Left()
           print('Done')
      

      The following output happens on PyPy environments

      /Users/ogi/.pyenv/versions/pyqtgraph-pyside6-pypy38/bin/pypy /Users/ogi/Developer/pyqtgraph/playground/test-mixin.py
      Right
      Object.__init__
      Mixin.__init__
      Left
      Object.__init__
      
      Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

      The following output occurs on non-PyPy environments

      /Users/ogi/.pyenv/versions/pyqtgraph-pyside6_63-py39/bin/python /Users/ogi/Developer/pyqtgraph/playground/test-mixin.py
      Right
      Object.__init__
      Mixin.__init__
      Left
      Object.__init__
      Mixin.__init__
      Done
      
      Process finished with exit code 0

       

      Attachments

        1. pyside1991_stack.txt
          11 kB
        2. pyside1991.py
          0.8 kB

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              j9ac9k Ognyan Moore
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes