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

Multiple Inheritance segfault on PyPySide

XMLWordPrintable

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

      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

       

        1. pyside1991_stack.txt
          11 kB
        2. pyside1991.py
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes