[PyQt] Crash in KMainWindow.saveProperties() [small sample
C++/Python code provided]
dato at net.com.org.es
Tue Aug 28 21:30:36 BST 2007
* Jim Bublitz [Tue, 28 Aug 2007 12:56:19 -0700]:
> On Tuesday 28 August 2007 11:10, Adeodato Simó wrote:
> > Hello.
> > I'm getting the same backtrace as mentioned in . Please find attached
> > a minimal C++ example application that successfully saves its state, and
> > a Python equivalent that crashes when logging out of KDE.
> > Note that the crash is not related to using config, just providing an
> > empty saveProperties() crahses as well.
> It doesn't crash here (just running the simple app you attached), so I can't
> actually test a solution,
Oh, and what could be different? Can you test with xsm to see if it
helps? (I guess you're familiar with xsm, but just in case: "echo xterm >~/.xsmstartup;
xsm; ./saveProperties.py from that xterm; select shutdown -> with
checkpoint -> "foo").
Do you think there's a chance a newer version of PyKDE could help?
> but Simon Edwards ran into a similar problem with
> PyKDE4 and fixed it by globally declaring 'application' (from your example):
> application = None
> and then inside main(), adding:
> global application
> I think that should ensure that KApplication is the last object destroyed.
I'm afraid this didn't help.
> The other possibility is to construct the main window and KApplication in
> global space, after the "if __name__ == __main__" test, instead of putting
> them inside a function or class method. That seems to have fewer problems
> with exit crashes (but other things can cause them as well).
In any case, thanks for your help.
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
In my opinion, the most fruitful and natural play of the mind is in
conversation. I find it sweeter than any other action in life; and if I
were forced to choose, I think I would rather lose my sight than my
hearing and voice.
-- Michel de Montaigne
More information about the PyQt