[Issue N26193] QApplication dtor change breaks KDE applications

qt-bugs at trolltech.com qt-bugs at trolltech.com
Tue Jul 8 13:14:57 BST 2003


Hi Malte,

On Tuesday, 08. Jul 2003 03:26 Malte Starostik wrote:
> the addition of is_app_closing = FALSE;
> in QApplication::~QApplication() (qapplication.cpp:1093) causes
> invalid memory references during shutdown in some KDE applications,
> most notably konqueror. In my particular case the usual symptom is
> konqueror hanging around with 100% CPU usage in KDE's malloc
> replacement. Here is what happens:

<snip>

> QApplication::eventLoop():
>     if ( !eventloop && !is_app_closing )
>         (void) new QEventLoop( qApp, "default event loop" );
>
> But since QApplication's dtor reset is_app_closing before we arrived
> here, a new event loop is constructed instead of returning null. This
> results in an invalid reference to the already-closed X11 display when
> the event loop is initialized.

You are right, this is indeed a bug. It was introduced when trying
to clean up all variables initialized by QApplication, since some
programs will try to create two (or more) QApplication objects during
its lifetime, and "is_app_closing" was also (erroneously) included.

This is now fixed, and will be included in tonight's snapshot.

Thanks for pointing this out.

--
Jan Erik Hanssen
Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway





More information about the kde-core-devel mailing list