Pyside open gl panning bug

Bug #1223173 reported by Jochen Schroeder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyqtgraph
Confirmed
Undecided
Unassigned

Bug Description

Hi,

I found a bug when using opengl and pyside and panning using the middle mouse button. This is reproducable using the any of the 3d plotting examples. Traceback:

  File "/usr/lib/pymodules/python2.7/pyqtgraph/opengl/GLViewWidget.py", line 226, in mouseMoveEvent
    self.pan(diff.x(), 0, diff.y(), relative=True)
  File "/usr/lib/pymodules/python2.7/pyqtgraph/opengl/GLViewWidget.py", line 196, in pan
    self.opts['center'] = self.opts['center'] + xVec * xScale * dx + yVec * xScale * dy + zVec * xScale * dz
RuntimeError: maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/pyqtgraph/opengl/GLViewWidget.py", line 226, in mouseMoveEvent
    self.pan(diff.x(), 0, diff.y(), relative=True)
  File "/usr/lib/pymodules/python2.7/pyqtgraph/opengl/GLViewWidget.py", line 196, in pan
    self.opts['center'] = self.opts['center'] + xVec * xScale * dx + yVec * xScale * dy + zVec * xScale * dz
RuntimeError: maximum recursion depth exceeded while calling a Python object

I tried to chase this down, but could not really find out more, than that this seems somehow because of adding QVectors (I tried to reproduce this in an isolated test case but couldn't). This might very well be a Pyside bug, if yes let me know and I report there.

Running Ubuntu with pyside 1.1.2 and pyqtgraph 0.9.7

Cheers
Jochen

Changed in pyqtgraph:
status: New → Confirmed
Revision history for this message
lcampagn (luke-campagnola) wrote :

This does appear to be a PySide bug. Simple example:

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

I have worked around this by converting the QVector3D to a Vector before adding to self.opts['center'].

Revision history for this message
Jochen Schroeder (cyco) wrote : Re: [Bug 1223173] Re: Pyside open gl panning bug

On 10/09/13 16:48, lcampagn wrote:
> This does appear to be a PySide bug. Simple example:
>
> >>> 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

Ah I see I was adding two QVector3D when I was trying to make a small
testcase. I will submit a bug report to PySide.

>
> I have worked around this by converting the QVector3D to a Vector before
> adding to self.opts['center'].
>
Great.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.