Summary: | klauncher crash close XCloseDisplay | ||
---|---|---|---|
Product: | [I don't know] kde | Reporter: | Robert Gogolok <gogolok> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Robert Gogolok
2008-03-03 15:59:44 UTC
I tried to reproduce the crash. If I haven't run any kde4 program (so there is no kdeinit, kded, ...) and run 'kdeinit4' and kill it afterwards then klauncher will crash (with the backtrace above). There is the following commit for klauncher on kde 3.5: http://websvn.kde.org/branches/KDE/3.5/kdelibs/kinit/klauncher.cpp?view=diff&r1=248080&r2=248081 I applied the same logic ("if defined Q_WS_X11 && ! defined K_WS_QTONLY") on klauncher in 4.0.1: --- klauncher.cpp.old 2008-03-03 17:46:20.000000000 +0100 +++ klauncher.cpp 2008-03-03 17:39:56.000000000 +0100 @@ -50,7 +50,7 @@ #include <kio/connection.h> #include <kio/slaveinterface.h> -#ifdef Q_WS_X11 +#if defined Q_WS_X11 && ! defined K_WS_QTONLY #include <kstartupinfo.h> #include <X11/Xlib.h> #endif @@ -229,7 +229,7 @@ void KLauncher::close() { -#ifdef Q_WS_X11 +#if define Q_WS_X11 && ! defined K_WS_QTONLY if( mCached_dpy != NULL ) XCloseDisplay( mCached_dpy ); #endif @@ -492,7 +492,7 @@ requestResult.error += ":\n" + request->errorMsg; requestResult.pid = 0; -#ifdef Q_WS_X11 +#if defined Q_WS_X11 && ! defined K_WS_QTONLY if (!request->startup_dpy.isEmpty()) { Display* dpy = NULL; @@ -783,7 +783,7 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const QString& startup_id, const QStringList &envs ) { -#ifdef Q_WS_X11 +#if defined Q_WS_X11 && ! defined K_WS_QTONLY request->startup_id = "0"; if( startup_id == "0" ) return; @@ -836,7 +836,7 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QString& startup_id, const QStringList &envs ) { -#ifdef Q_WS_X11 +#if defined Q_WS_X11 && ! defined K_WS_QTONLY if( request != NULL ) request->startup_id = "0"; if( !startup_id.isEmpty() && startup_id != "0" ) klauncher doesn't crash anymore (since XCloseDisplay is not being called). The patch in the last post contains a type! It does not resolve the problem. |