[PyQt] Re: Crash with shortcircuit signals

Giovanni Bajo rasky at develer.com
Wed Jul 18 09:32:40 BST 2007


On 7/17/2007 3:47 PM, 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.

I also suggest adding an assert to PyQtProxy's destructor: you can check 
that the instance is already disabled (= removed from the global list) 
when the destructor is called, and abort otherwise.
-- 
Giovanni Bajo



More information about the PyQt mailing list