[PyKDE] Quitting invokes crash handler
    Phil Thompson 
    phil at river-bank.demon.co.uk
       
    Fri Aug 30 17:27:01 BST 2002
    
    
  
Jim Bublitz wrote:
> On 29-Aug-02 Frederick Polgardy Jr wrote:
> 
>>Fascinating.  If I add a 'w = None' after returning from
>>a.exec_loop(), the  crash problem goes away....  It's also
>>interesting that this wasn't happening with Python 2.1.3
>>yesterday (the Debian packages for 2.2 were uploaded last
>>night).
>>
>  
> 
>>Ideas?
>>
> 
> w = None works for me too, and is much better than restricting
> KApplication variable names to three letters (I don't know why, but
> that worked). A 'del w' (which is effectively the same) will work
> also.
> 
> The w = None is at least reasonable - it points to some problem
> with 'w' (KMainWindow) needing to be destroyed before the 'exit'
> code runs. Between that and the sensitivity to the length of a
> variable name, it appears to be some sort of memory allocation or
> pointer error - it could be a Python 2.2 problem also in that case.
> 
> Once again, I'd love to fix this but have no idea where to begin.
I haven't looked at the way you have implemented KApplication, but have 
a look at how I've implemented the QApplication dtor. You will need to 
do something similar - look at the comments at the start of 
PyQtDisownTopLevelWidgets().
Phil
    
    
More information about the PyQt
mailing list