[PyQt] Re: Crash with shortcircuit signals

Phil Thompson phil at riverbankcomputing.co.uk
Fri Jul 20 10:22:26 BST 2007


On Thursday 19 July 2007 7:56 pm, Giovanni Bajo wrote:
> On 18/07/2007 22.43, Phil Thompson wrote:
> >>>>> I copied the list removal code back into the destructor (keeping a
> >>>>> duped copy in the disable() slot), and it seems to work.
> >>>>>
> >>>>> Do you agree on this fix? Testcases are really hard and tiresome to
> >>>>> extract so I'd rather avoid it if it's not really really necessary...
> >>>>
> >>>> I can only see one place that a PyQtProxy is explicitly deleted. Can
> >>>> you try changing the "delete up" in sipQtDestroyUniversalSlot() to
> >>>> "up->disable()" instead of your fix.
> >>>
> >>> It worked. One nit: disable() was a private member, so I changed it to
> >>> public.
> >>
> >> Too fast: I was getting again an infinite loop... and the fix I found
> >> was to NULLify the nextup and prevup pointers in the disable() method,
> >> after removing the PyQtProxy from the global list.
> >>
> >> Does it make any sense to you?
> >
> > No.
> >
> > Are you sure you fully backed out your own fix? My fix is in the current
> > snapshot.
>
> Yes I am sure. Your vanilla snapshot triggers an infinite loop. If you
> nullify the two pointers, everything works.

I've now seen a place where your fix might make sense.

> > Can you detect the infinite loop and generate a backtrace?
>
> Sure, but I doubt it'll be before next Monday.

I've nulled the pointers for tonight's snapshot, and made one other related 
change (which hopefully won't introduce a new problem).

Phil


More information about the PyQt mailing list