Nepomukserver crash

Michael Jansen kde at michael-jansen.biz
Sun Sep 6 17:30:33 BST 2009


Hi

I see the following crash since sebastian made nepomukserver a gui-less  
application (KUniqueApplication(false)).

Even if the app said it has no gui. KApplication tries to get some information 
from the x-server in KApplication::checkRestartVersion

    Display* dpy = QX11Info::display();
	[...]
    if( XGetWindowProperty( dpy, RootWindow( dpy, 0 ), XInternAtom( dpy, 
"KDE_SESSION_VERSION", False ),

The fix is more or less easy. Just check if dpy is NULL and don't execute 
XGetWindowProperty() if not. But i can't decide if the calling of that 
function itself is wrong in an application without gui.

This callback is activated somewhere in qt if i understand the code correctly. 
Does anyone know the answer?


#0  XInternAtom (dpy=0x0, name=0x7f6b2b6a9ab3 "KDE_SESSION_VERSION", 
onlyIfExists=0) at IntAtom.c:177
#1  0x00007f6b2b55a7ac in checkRestartVersion (sm=@0x68a060) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:692
#2  0x00007f6b2b55c4b4 in KApplication::saveState (this=0x7fff0dadfc00, 
sm=@0x68a060) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:770
#3  0x00007f6b2a4c4d76 in sm_performSaveYourself (smd=0x682e30) at 
kernel/qapplication_x11.cpp:5595
#4  0x00007f6b2a4c510a in sm_saveYourselfCallback (smcConn=<value optimized 
out>, clientData=0x7f6b2b6a9ab3, saveType=0, shutdown=<value optimized out>, 
interactStyle=53)
    at kernel/qapplication_x11.cpp:5544
#5  0x00007f6b2744b777 in _SmcProcessMessage (iceConn=0x679cb0, 
clientData=0x685130, opcode=<value optimized out>, length=<value optimized 
out>, swap=0, replyWait=0x0,
    replyReadyRet=0x7fff0dadf1e8) at sm_process.c:252
#6  0x00007f6b2723a92e in IceProcessMessages (iceConn=0x679cb0, replyWait=0x0, 
replyReadyRet=0x0) at process.c:344
#7  0x00007f6b2a4bcb09 in QSmSocketReceiver::qt_metacall (this=0x679da0, 
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff0dadf330)
    at .moc/release-shared/qapplication_x11.moc:65
#8  0x00007f6b2d126e32 in QMetaObject::activate (sender=0x67cc70, 
from_signal_index=<value optimized out>, to_signal_index=4, argv=0x0) at 
kernel/qobject.cpp:3113
#9  0x00007f6b2d15f02e in QSocketNotifier::activated (this=0x0, _t1=9) at 
.moc/release-shared/moc_qsocketnotifier.cpp:83
#10 0x00007f6b2d12c493 in QSocketNotifier::event (this=0x67cc70, 
e=0x7fff0dadf920) at kernel/qsocketnotifier.cpp:316
#11 0x00007f6b2a460b0d in QApplicationPrivate::notify_helper (this=0x675420, 
receiver=0x67cc70, e=0x7fff0dadf920) at kernel/qapplication.cpp:4065
#12 0x00007f6b2a468d9a in QApplication::notify (this=0x7fff0dadfc00, 
receiver=0x67cc70, e=0x7fff0dadf920) at kernel/qapplication.cpp:4030
#13 0x00007f6b2b55c95e in KApplication::notify (this=0x7fff0dadfc00, 
receiver=0x67cc70, event=0x7fff0dadf920)
    at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302
#14 0x00007f6b2d11204c in QCoreApplication::notifyInternal 
(this=0x7fff0dadfc00, receiver=0x67cc70, event=0x7fff0dadf920) at 
kernel/qcoreapplication.cpp:610
#15 0x00007f6b2d13b729 in socketNotifierSourceDispatch (source=0x678be0) at 
kernel/qcoreapplication.h:213
#16 0x00007f6b28f3f0fb in g_main_context_dispatch () from 
/usr/lib64/libglib-2.0.so.0
#17 0x00007f6b28f428cd in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007f6b28f42a8b in g_main_context_iteration () from 
/usr/lib64/libglib-2.0.so.0
#19 0x00007f6b2d13b4af in QEventDispatcherGlib::processEvents (this=0x61b970, 
flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:328
#20 0x00007f6b2d1108d2 in QEventLoop::processEvents (this=<value optimized 
out>, flags={i = 229505808}) at kernel/qeventloop.cpp:149
#21 0x00007f6b2d110ca4 in QEventLoop::exec (this=0x7fff0dadfb50, flags={i = 
229505888}) at kernel/qeventloop.cpp:201
#22 0x00007f6b2d112f94 in QCoreApplication::exec () at 
kernel/qcoreapplication.cpp:888
#23 0x00007f6b1f65afb6 in kdemain (argc=1, argv=0x61b910) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdebase/runtime/nepomuk/server/main.cpp:113
#24 0x00000000004072a2 in launch (argc=1, _name=0x66f9e8 
"/kde/trunk/base/bin/nepomukserver", args=0x66fa0a "", cwd=0x0, envc=0, 
envs=<value optimized out>, reset_env=false,
    tty=0x0, avoid_loops=false, startup_id_str=0x40a19e "0") at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kinit/kinit.cpp:705
#25 0x0000000000407bb1 in handle_launcher_request (sock=8, who=<value 
optimized out>) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kinit/kinit.cpp:1197
#26 0x000000000040824f in handle_requests (waitForPid=0) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kinit/kinit.cpp:1390
#27 0x0000000000408a19 in main (argc=4, argv=0x7fff0dae0788, 
envp=0x7fff0dae07b0) at 
/home/mjansen/stage/kde/trunk/src/KDE/kdelibs/kinit/kinit.cpp:1825







More information about the kde-core-devel mailing list