qt-bugs@ issue : 236401 Trolltech task ID : none bugs.kde.org number : none applied: no author: Lubos Lunak Sync X connection before resetting X error handler to the one provided by Xlib (which just aborts), in case there are still queued requests that may result in an error. --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2312,6 +2312,8 @@ void qt_cleanup() #endif // Reset the error handlers + if (qt_is_gui_used) + XSync(X11->display, False); // sync first to process all possible errors XSetErrorHandler(original_x_errhandler); XSetIOErrorHandler(original_xio_errhandler);