[PyQt] Re: Signal problem with latest PyQt snapshot
Detlev Offenbach
detlev at die-offenbachs.de
Mon Apr 13 11:45:59 BST 2009
On Montag, 13. April 2009, Phil Thompson wrote:
> On Sun, 12 Apr 2009 18:47:23 +0200, Detlev Offenbach
>
> <detlev at die-offenbachs.de> wrote:
> > Hi,
> >
> > I am observing an unlimited recursion problem in some eric4 code. In the
> > ViewManager I am connecting to a signal sent by the editor with this code
> >
> > self.connect(editor, SIGNAL('bookmarkToggled'),
>
> self.__bookmarkToggled)
>
> > In the method __bookmarkToggled I am doing some things and reemit the
> > signal
> > with this line
> >
> > self.emit(SIGNAL('bookmarkToggled'), editor)
>
> That's not the same signal - one is a signal of editor, the other is a
> signal of ViewManager.
I know that. It is a different signal with the exact same signature.
>
> > This seems to go into an infinite recursion because I get this error
> >
> > RuntimeError: maximum recursion depth exceeded
>
> Can you trace the recursion path?
I did and found, that the emit in ViewManager causes the __bookmarkToggled
method to be called again as if the ViewManager's signal was connected to
this slot. Changing the name of the signal in the emit call gets rid of the
recursion.
In addition to this problem I have an even more serious one. If the very same
method is called via the signal by clicking in the editor margin, eric4
crashes with this message.
*** glibc detected *** /home/detlev/pyqt45env/bin/python: double free or
corruption (out): 0x00007fffb7985860 ***
======= Backtrace: =========
/lib64/libc.so.6[0x7f30ae875118]
/lib64/libc.so.6(cfree+0x76)[0x7f30ae876c76]
/home/detlev/pyqt45env/lib/python2.6/site-packages/PyQt4/QtCore.so[0x7f30ad956ea1]
/home/detlev/pyqt45env/lib/python2.6/site-packages/sip.so[0x7f30ab6010b9]
/usr/lib64/libpython2.6.so.1.0[0x7f30af469c2c]
/usr/lib64/libpython2.6.so.1.0[0x7f30af464186]
/home/detlev/pyqt45env/lib/python2.6/site-packages/PyQt4/QtCore.so[0x7f30ad95b3d5]
/home/detlev/pyqt45env/lib/python2.6/site-packages/PyQt4/QtCore.so[0x7f30ad95c564]
/home/detlev/pyqt45env/lib/python2.6/site-packages/PyQt4/QtCore.so[0x7f30ad95c635]
/usr/local/Trolltech/Qt-4.5.0/lib/libQtCore.so.4
(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x262)[0x7f30ad524db2]
/usr/local/Trolltech/Qt-4.5.0/lib/libqscintilla2.so.5
(_ZN13QsciScintilla13marginClickedEii6QFlagsIN2Qt16KeyboardModifierEE+0x44)
[0x7f30a878b024]
/usr/local/Trolltech/Qt-4.5.0/lib/libqscintilla2.so.5
(_ZN13QsciScintilla17handleMarginClickEiii+0x71)[0x7f30a86950b1]
/usr/local/Trolltech/Qt-4.5.0/lib/libqscintilla2.so.5
(_ZN13QsciScintilla11qt_metacallEN11QMetaObject4CallEiPPv+0x1b6)
[0x7f30a878b296]
/home/detlev/pyqt45env/lib/python2.6/site-packages/PyQt4/Qsci.so[0x7f30a8a6b821]
/usr/local/Trolltech/Qt-4.5.0/lib/libQtCore.so.4
(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x262)[0x7f30ad524db2]
Regards
Detlev
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list