[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 

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

Detlev Offenbach
detlev at die-offenbachs.de

More information about the PyQt mailing list