--------------Boundary-00=_23H8X3W6PTGEDLTKAYIT Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Hello, if QApplication::eventLoop() is referenced before QApplication is created (e.g. when creating a QSocketNotifier, as in kded when fam daemon is running or dnotify support is enabled), it doesn't add the X11 connection fd to the list of watched fd's (because there's no QApplication instance at that time). Later this causes crash when qt_gui_is_used becomes true but d->xfd is still -1. The attached patch should fix the problem. You'll also have to do something with QEventLoop::appStartingUp() in qeventloop.cpp . -- Lubos Lunak KDE developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz/ --------------Boundary-00=_23H8X3W6PTGEDLTKAYIT Content-Type: text/x-diff; charset="us-ascii"; name="qeventloop_x11.cpp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qeventloop_x11.cpp.patch" --- qeventloop_x11.cpp.sav Fri Sep 6 14:31:53 2002 +++ qeventloop_x11.cpp Tue Sep 10 18:24:27 2002 @@ -224,7 +224,7 @@ bool QEventLoop::processNextEvent( Proce FD_ZERO( &d->sn_vec[2].select_fds ); } - if ( qt_is_gui_used ) { + if ( qt_is_gui_used && d->xfd != -1 ) { // select for events on the event socket - only on X11 FD_SET( d->xfd, &d->sn_vec[0].select_fds ); highest = QMAX( highest, d->xfd ); @@ -321,3 +321,9 @@ bool QEventLoop::hasPendingEvents() cons extern uint qGlobalPostedEventsCount(); // from qapplication.cpp return ( qGlobalPostedEventsCount() || XPending( QPaintDevice::x11AppDisplay() ) ); } + +void QEventLoop::appStartingUp() +{ + if ( qt_is_gui_used && d->xfd == -1 ) // update d->xfd + d->xfd = XConnectionNumber( QPaintDevice::x11AppDisplay() ); +} --------------Boundary-00=_23H8X3W6PTGEDLTKAYIT--