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

Subclassing and adding QVector3d causes infinite recursion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.1.2, dev
    • Fix Version/s: 5.12.0, dev
    • Component/s: PySide
    • Labels:
    • Environment:
      Ubuntu raring
    • Commits:
      0a70c8485771ae8cc62faaa775b1db2a5dbd95ef (pyside/pyside-setup/5.12)

      Description

      Subclassing a QVector3D and adding the subclass to the QVector causes a RuntimeError: maximum recursion depth exceeded while calling a Python object

      Minimum test case:

      >>> from PySide.QtGui import QVector3D
      >>> class Vector(QVector3D):
      ... pass
      ...
      >>> v1 = Vector(1,2,3)
      >>> v2 = QVector3D(1,2,3)
      >>> v1+v1
      PySide.QtGui.QVector3D(2.000000, 4.000000, 6.000000)
      >>> v2+v2
      PySide.QtGui.QVector3D(2.000000, 4.000000, 6.000000)
      >>> v1+v2
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      RuntimeError: maximum recursion depth exceeded while calling a Python object

      See this bug in pyqtgraph for the original report:
      https://bugs.launchpad.net/pyqtgraph/+bug/1223173

        Attachments

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

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            cycoj Jochen Schroeder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes