Version: Unbekannt (using KDE 3.1.0) Installed from: compiled sources Compiler: gcc version 3.2.1 OS: Linux (i686) release 2.4.20 It seems that kate crashes when there are directories in the historie which are not accessible when kate is started. If I delete the line "location=..." in the fileselector section, kate starts up fine. The following katerc shows the crash. ------------------------------------------------------------------------------ [General] Number of recent files=10 Opaque Resize=true Show Console=false Show Full Path in Title=false Sync Konsole=true reopen at startup=true restore views=false [KDE] MultipleInstances=false [KFileDialog Settings] Automatic Preview=true Preview Size=60 Recent Files=/home/daahb/scanner-win-1.01/md5_create.pl,/home/daahb/scanner-win-1.01/helpers.pm,/home/daahb/h/PRODUKTE/SMK/smk_linux-0.01/AGENTEN/system_linux.pm,/home/daahb/scanner-win-1.01/manageauf.pl ShowPreviews=false ViewMode=SmallColumns [KFileDialog Speedbar] Speedbar IconSize=32 [KPrinter Settings] ApplicationOptions=app-kate-boxcolor,#000000,app-kate-boxmargin,6,app-kate-boxwidth,1,app-kate-footerbg,#d3d3d3,app-kate-footerfg,#000000,app-kate-footerformat,||%U,app-kate-footerusebg,true,app-kate-headerbg,#d3d3d3,app-kate-headerfg,#000000,app-kate-headerformat,%y|%f|%p,app-kate-headerusebg,true,app-kate-hffont,,app-kate-printguide,false,app-kate-printlinenumbers,false,app-kate-printselection,false,app-kate-usebackground,false,app-kate-usebox,false,app-kate-usefooter,true,app-kate-useheader,true DialogReduced=true DocDirectory=/home/daahb PrintCommand= Printer=In Datei drucken (PDF) [MainWindow] Height 768=720 MenuBar=Enabled StatusBar=Enabled Width 1024=1016 [MainWindow Toolbar mainToolBar] Hidden=false IconSize=22 IconText=IconOnly Index=0 NewLine=false Offset=-1 Position=Top [Recent Files] File1=file:/home/daahb/scanner-win-1.01/CONTROL/smk_versions-default.fbs File10=file:/home/daahb/scanner-win-1.01/AGENTEN/filecopy.pm File2=file:/home/daahb/scanner-win-1.01/AGENTEN/smk_versions.pm File3=file:/home/daahb/scanner-win-1.01/AGENTEN/software_linux.pm File4=file:/home/daahb/scanner-win-1.01/AGENTEN/system_linux.pm File5=file:/home/daahb/scanner-win-1.01/md5_create.pl File6=file:/home/daahb/scanner-win-1.01/helpers.pm File7=file:/home/daahb/scanner-win-1.01/AGENTEN/pcsystem.pm File8=file:/home/daahb/scanner-win-1.01/smk.pl File9=file:/home/daahb/scanner-win-1.01/program.pm [TipOfDay] RunOnStart=false [dock_setting_default] DOCKconsole:geometry=0,0,809,236 DOCKconsole:stayButton=false DOCKconsole:type=NULL_DOCK DOCKconsole:visible=false DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:first_name=DOCKfilelist,DOCKoperator DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:last_name=mainDock,DOCKconsole DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:orientation=1 DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:parent=yes DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:sepPos=20 DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:stayButton=false DOCKfilelist,DOCKoperator,mainDock,DOCKconsole:type=GROUP DOCKfilelist,DOCKoperator,mainDock:first_name=DOCKfilelist,DOCKoperator DOCKfilelist,DOCKoperator,mainDock:last_name=mainDock DOCKfilelist,DOCKoperator,mainDock:orientation=1 DOCKfilelist,DOCKoperator,mainDock:parent=yes DOCKfilelist,DOCKoperator,mainDock:sepPos=20 DOCKfilelist,DOCKoperator,mainDock:stayButton=false DOCKfilelist,DOCKoperator,mainDock:type=GROUP DOCKfilelist,DOCKoperator:curTab=0 DOCKfilelist,DOCKoperator:parent=yes DOCKfilelist,DOCKoperator:stayButton=false DOCKfilelist,DOCKoperator:tabNames=DOCKfilelist,DOCKoperator DOCKfilelist,DOCKoperator:type=TAB_GROUP DOCKfilelist:stayButton=false DOCKfilelist:type=DOCK DOCKoperator:stayButton=false DOCKoperator:type=DOCK Main:Geometry=0,0,1016,720 Main:dock=mainDock Main:view=DOCKfilelist,DOCKoperator,mainDock Main:visible=true NameList=mainDock,DOCKfilelist,DOCKoperator,DOCKconsole,DOCKfilelist\\,DOCKoperator,DOCKfilelist\\,DOCKoperator\\,mainDock Version=0.0.5 mainDock,DOCKconsole:first_name=mainDock mainDock,DOCKconsole:last_name=DOCKconsole mainDock,DOCKconsole:orientation=0 mainDock,DOCKconsole:parent=yes mainDock,DOCKconsole:sepPos=64 mainDock,DOCKconsole:stayButton=false mainDock,DOCKconsole:type=GROUP mainDock:stayButton=false mainDock:type=DOCK [fileselector] AutoSyncEvents=0 Show Full Path in Title=false current filter= dir history=scanner-win-1.01/CONTROL/,scanner-win-1.01/,/home/daahb/scanner-win-1.01/CONTROL/ filter history= filter history len=9 last filter= location=/home/daahb/scanner-win-1.01/CONTROL/ pathcombo history len=9 restore last filter=true restore location=true toolbar actions=up,back,forward,home,short view,detailed view,bookmarks,sync_dir [fileselector:dir] Separate Directories=false Show Preview=false Show hidden files=false Sort by=Name Sort case insensitively=true Sort directories first=true Sort reversed=false View Style=Detail --------------------------------------------------------------------------- 0x41102fd9 in wait4 () from /lib/libc.so.6 #0 0x41102fd9 in wait4 () from /lib/libc.so.6 #1 0x41181a5c in sys_sigabbrev () from /lib/libc.so.6 #2 0x40f5a663 in waitpid () from /lib/libpthread.so.0 #3 0x40687ca0 in KCrash::defaultCrashHandler(int) () from /opt/kde-3.1/lib/libkdecore.so.4 #4 0x40f580ab in pthread_kill () from /lib/libpthread.so.0 #5 0x4108ef98 in sigaction () from /lib/libc.so.6 #6 0x415bdcdd in KateApp::raiseCurrentMainWindow() () from /opt/kde-3.1/lib/libkateinterfaces.so #7 0x415bd2a4 in KateApp::newInstance() () from /opt/kde-3.1/lib/libkateinterfaces.so #8 0x406a5a07 in KUniqueApplication::processDelayed() () from /opt/kde-3.1/lib/libkdecore.so.4 #9 0x406a5dab in KUniqueApplication::qt_invoke(int, QUObject*) () from /opt/kde-3.1/lib/libkdecore.so.4 #10 0x415bbb64 in KateApp::qt_invoke(int, QUObject*) () from /opt/kde-3.1/lib/libkateinterfaces.so #11 0x40a248b9 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #12 0x40d02022 in QSignal::signal(QVariant const&) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #13 0x40a3e988 in QSignal::activate() () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #14 0x40a45903 in QSingleShotTimer::event(QEvent*) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #15 0x409c6ac6 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #16 0x409c62db in QApplication::notify(QObject*, QEvent*) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #17 0x40609399 in KApplication::notify(QObject*, QEvent*) () from /opt/kde-3.1/lib/libkdecore.so.4 #18 0x409a24f3 in QEventLoop::activateTimers() () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #19 0x40980018 in QEventLoop::processEvents(unsigned) () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #20 0x409da776 in QEventLoop::enterLoop() () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #21 0x409c6d71 in QApplication::enter_loop() () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #22 0x40b88411 in QDialog::exec() () from /usr/local/qt-3.1.0/lib/libqt-mt.so.3 #23 0x404b8243 in createKMessageBox(KDialogBase*, QMessageBox::Icon, QString const&, QStringList const&, QString const&, bool*, int, QString const&) () from /opt/kde-3.1/lib/libkdeui.so.4 #24 0x404baaa0 in KMessageBox::error(QWidget*, QString const&, QString const&, int) () from /opt/kde-3.1/lib/libkdeui.so.4 #25 0x4027bbcf in KDirOperator::setURL(KURL const&, bool) () from /opt/kde-3.1/lib/libkio.so.4 #26 0x415ccbe4 in KateFileSelector::setDir(KURL) () from /opt/kde-3.1/lib/libkateinterfaces.so #27 0x415cbdeb in KateFileSelector::readConfig(KConfig*, QString const&) () from /opt/kde-3.1/lib/libkateinterfaces.so #28 0x415d54f6 in KateMainWindow::readOptions(KConfig*) () from /opt/kde-3.1/lib/libkateinterfaces.so #29 0x415d1b35 in KateMainWindow::KateMainWindow(KateDocManager*, KatePluginManager*) () from /opt/kde-3.1/lib/libkateinterfaces.so #30 0x415bd9e1 in KateApp::newMainWindow() () from /opt/kde-3.1/lib/libkateinterfaces.so #31 0x415bc599 in KateApp::KateApp(bool, bool) () from /opt/kde-3.1/lib/libkateinterfaces.so #32 0x40767585 in main () from /opt/kde-3.1/lib/kate.so #33 0x0804cb4c in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) () #34 0x0804d923 in handle_launcher_request(int) () #35 0x0804de0c in handle_requests(int) () #36 0x0804eba4 in main () #37 0x4107d3f2 in __libc_start_main () from /lib/libc.so.6 kio (KTrader): KServiceTypeProfile::offers( KTextEditor/Plugin, ) kio (KTrader): Returning 3 offers kio (KTrader): KServiceTypeProfile::offers( Kate/Plugin, ) kio (KTrader): Returning 10 offers kio (KDirLister): +KDirLister kio (KDirListerCache): +KDirListerCache kio (KDirWatch): Available methods: Stat, FAM kio (KDirLister): [virtual bool KDirLister::openURL(const KURL&, bool, boo l)] file:/home/Andreas/ keep=false reload=false kio (KDirListerCache): [void KDirListerCache::listDir(KDirLister*, const K URL&, bool, bool)] 0x82007a8 url=file:/home/Andreas keep=false reload=fals e kio (KDirListerCache): [void KDirListerCache::stop(KDirLister*)] lister: 0 x82007a8 kio (KDirListerCache): [void KDirListerCache::forgetDirs(KDirLister*)] 0x8 2007a8 kio (KDirListerCache): listDir: Entry not in cache or reloaded: file:/home /Andreas kio (KDirWatch): Added Dir /home/Andreas [KDirWatch-1] kio (KDirWatch): Setup FAM (Req 1) for /home/Andreas kdecore (KAction): WARNING: KAction::plug(): has no KAccel object; this = 0x821c570 name = add_bookmark parentCollection = (nil) QGList::locate: Index 0 out of range ERROR: KUniqueApplication: DCOP communication error!
This bug also occurs for me, but only if the directory missing is at least two levels deeper than the existing parent directory (hope it makes sense, my English is far from perfect). For example, /home/user/dir1 does not exist, but /home/user exists. If location=/home/user/dir1 in katerc, kate does not crash, but if location=/home/user/dir1/otherdir, kate crashes directly on startup.
Some detailed investigation on this: using kde 3.1 from suse rpms create ~/foo/bar.txt open kate and in the selector, navigate to the directory foo, select bar.txt to open it. close kate and the location line in katerc now looks like this: location=/home/user/foo remove the folder foo and open kate again. in the selector, we pop back to ~/ now close kate again and create ~/foo/foo2/bar.txt, open kate (we start in ~/ again) and navigate to and open bar.txt then close kate and remove ~/foo the location line looks now like this location=/home/user/foo/foo2 now, when we open kate again, we get a sig11: kdecore (KLocale): WARNING: found no definition of PluralForm for de kate: KateCodeFoldingTree::clear() kate: KateCodeFoldingTree::clear() ERROR: KUniqueApplication: DCOP communication error! removing the location line resolves the problem A possible solution would be to default to ~/ if the last location does not exist. another way would be to try to cd .. until we've found an existing directory (better solution imho)
Subject: kdebase/kate/app CVS commit by rodda: Fix bug 54120... don't try to change to directories that don't exist It's not the best fix, but at least it doesn't crash. CCMAIL:54120-done@bugs.kde.org M +4 -2 katefileselector.cpp 1.21 --- kdebase/kate/app/katefileselector.cpp #1.20:1.21 @@ -64,4 +64,5 @@ #include <kpopupmenu.h> #include <kdialog.h> +#include <kio/netaccess.h> #include <kdebug.h> @@ -329,4 +330,5 @@ void KateFileSelector::slotFilterChange( void KateFileSelector::setDir( KURL u ) { + if (KIO::NetAccess::exists(u)) dir->setURL(u, true); }