[PyKDE] Seg Faults on Fedora Core 2 with kde-redhat RPMS
jbublitz at nwinternet.com
Fri Aug 27 18:16:36 BST 2004
On Friday 27 August 2004 08:55, Jonathan Gardner wrote:
> I'm getting Seg Faults (core dumps, crashes) in general with the RPMs from
> datepicker.py runs, but when it is closed, it segfaults. (See attached).
It's likely that KApplication.quit() isn't going to work reliably. I don't
recall all of the details, but it's related to the way KDE uses or implements
KMainWindow I believe. The solution is use a KMainWindow as the app's main
widget, and call KMainWindow.close() when quitting (which also allows you to
use queryClose() and queryExit() ). In datepicker.py, make KDatePicker a
child of a KMainWindow instance.
I haven't looked at this in a while, but I don't think it's possible to get
KApplication.quit(), KMainWindow.close() and KMainWindow.queryClose() to work
all at the same time, so I made the choice to favor KMainWindow. If I recall
correctly, there's some contention between KApplication.quit(),
QApplication.quit() and the KMainWindow methods.
There should probably be something in the docs about this.
I'm not sure if calling KDatePicker.close() instead of KApplication.quit()
would work, but you could try that too.
> database.py runs, but when it is cleaning up, a segfaul is caused. I think
> I traced it down to when it deletes the QLibrary, but I am not certain.
> All the examples I tested in both PyQt and PyKDE seem to work flawlessly,
More information about the PyQt