--Boundary-00=_vw6+9KE2Gx4hFSE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm trying to fix bug #51395 (http://bugs.kde.org/show_bug.cgi?id=51395). Unfortunately, the problems are a little out of my league, so if anyone can help me, I'd appreciate it. I had encountered problems similar to the user who reported the bug. My stack trace was different, however, and after some debugging, I discovered that if the "location" setting of katerc's [fileselector] group points to a non-existent path, then I get a crash. This is because kate attempts to set the path using KURL, which throws up a message box if it can't find the path. The message box then blocks the user interface (I think) and causes the crash when kate attempts to show its main window. This is probably a bug in KURL because I don't think it should be responsible for displaying error messages. The applications calling KURL should be the ones checking for return codes or exceptions and putting up error messages as needed. I can't be certain of that, so instead I patched kate. The problem can be fixed by changing the line in kdebase/kate/app/katefileselector.cpp so that if the path doesn't exist, the user's home path is used. A diff is attached. Feel free to apply after review. I'm surprised nobody else has encountered this bug, since it would seem very easy to duplicate. All you have to do is run kate, exit, delete whatever directory kate was looking at, then restart kate. (I haven't verified this, though.) Anyway, the big problem I'm having is with another bug that I discovered after fixing the one above. This bug (stack trace attached) is also likely due to an improper katerc because the crash seems to occur in kdelibs/kdeui/kdockwidget.cpp on line 2356, where the dock settings are loaded. The "c->readNumEntry" call returns 1, which is then passed to tab->page, which never returns because of the crash. I get lost trying to figure out what's happening here, mostly because I don't understand how kate loads the dock settings and displays the tabs. (I've never worked with Qt tab widgets before.) I hope someone can shed some light on what's happening here - or even better, post a patch! I've attached my katerc, which should allow reproduction of the bug. Thanks, Trevor --Boundary-00=_vw6+9KE2Gx4hFSE Content-Type: text/x-diff; charset="us-ascii"; name="katefileselector.cpp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="katefileselector.cpp.patch" --- katefileselector.cpp.old 2002-12-02 16:30:34.000000000 -0600 +++ katefileselector.cpp 2002-12-14 05:58:21.000000000 -0600 @@ -63,6 +63,7 @@ #include #include #include +#include #include //END Includes @@ -335,7 +336,10 @@ } void KateFileSelector::setDir( KURL u ) { - dir->setURL(u, true); + if ( KIO::NetAccess::exists(u) ) + dir->setURL(u, true); + else + dir->home(); } //END Public Slots --Boundary-00=_vw6+9KE2Gx4hFSE Content-Type: text/plain; charset="us-ascii"; name="kate-crash.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kate-crash.txt" [New Thread 8192 (LWP 29624)] 0x420ae169 in wait4 () from /lib/i686/libc.so.6 #0 0x420ae169 in wait4 () from /lib/i686/libc.so.6 #1 0x4212a2d0 in __DTOR_END__ () from /lib/i686/libc.so.6 #2 0x41062c63 in waitpid () from /lib/i686/libpthread.so.0 #3 0x4070a549 in KCrash::defaultCrashHandler(int) (sig=11) at kcrash.cpp:235 #4 #5 0x40d6af39 in QGList::locate(unsigned) (this=0x5b000000, index=1) at tools/qglist.cpp:322 #6 0x40a8db05 in QGList::at(unsigned) (this=0x5b000000, index=1) at ../include/qglist.h:168 #7 0x40c040cf in QPtrList::at(unsigned) (this=0x5b000000, i=1) at ../include/qptrlist.h:88 #8 0x40c02b74 in QTabBar::tabAt(int) const (this=0x40083be0, index=1) at widgets/qtabbar.cpp:942 #9 0x40c076fe in QTabWidget::page(int) const (this=0x8170728, index=1) at widgets/qtabwidget.cpp:906 #10 0x405a0eda in KDockManager::readConfig(KConfig*, QString) (this=0x812d938, c=0x8052c28, group=) at /opt/qt/include/qstring.h:933 #11 0x405956f9 in KDockMainWindow::readDockConfig(KConfig*, QString) ( this=0xfffffe00, c=0x0) at kdockwidget.cpp:169 #12 0x400687fb in KateMainWindow::readOptions(KConfig*) (this=0x8118a78, config=0x8052c28) at katemainwindow.cpp:422 #13 0x4006547f in KateMainWindow (this=0x8118a78, _m_docManager=0xfffffe00, _m_pluginManager=0xfffffe00, projectMan=0xfffffe00) at katemainwindow.cpp:143 #14 0x40052b50 in KateApp::newMainWindow() (this=0xbffff700) at kateapp.cpp:204 #15 0x400517bf in KateApp (this=0xbffff700, forcedNewProcess=false, oldState=false) at kateapp.cpp:68 #16 0x40014324 in main (argc=1, argv=0xbffff8b4) at katemain.cpp:106 #17 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6 --Boundary-00=_vw6+9KE2Gx4hFSE Content-Type: text/plain; charset="us-ascii"; name="katerc" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="katerc" [General] Opaque Resize=true Show Console=false Show Full Path in Title=false Sync Konsole=true [KFileDialog Settings] Automatic Preview=true Recent Files=/home/trevor/ipaq/article/code/code/servo-controller/servo-controller.c,/home/trevor/african-friends/african-friends-broadband.ram,/home/trevor/african-friends/african-friends-dialup.ram,/home/trevor/possible source of connections to sponsors for ghana dance group.txt [KFileDialog Speedbar] Speedbar IconSize=32 [KateDock::bottomDock] widget0=DOCKconsole [KateDock::leftDock] widget0=DOCKfilelist widget1=DOCKoperator [MainWindow] Height 1050=958 MenuBar=Enabled StatusBar=Enabled Width 1400=1393 [MainWindow Toolbar mainToolBar] Hidden=false IconSize=22 IconText=IconOnly Index=0 NewLine=false Offset=-1 Position=Top [Recent Files] File1=file:/home/trevor/ipaq/article/code/code/servo-controller/readme.html File10=file:/home/trevor/short_dld2.html File2=file:/home/trevor/ipaq/article/code/code/servo-controller/servo-controller.c File3=file:/home/trevor/ipaq/article/code/code/servo-controller/Makefile File4=file:/home/trevor/ipaq/article/servo-controller.c File5=file:/home/trevor/embarrassing teaching moments File6=file:/home/trevor/african-friends/index.html File7=file:/home/trevor/arttoday/get-wmf File8=file:/home/trevor/get-wmf File9=file:/home/trevor/short_dld.html [TipOfDay] RunOnStart=false [dock_setting_default] DOCKconsole:geometry=0,0,1111,694 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=1 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,1393,958 Main:dock=mainDock Main:view=DOCKfilelist,DOCKoperator,mainDock Main:visible=true NameList=mainDock,leftDock,rightDock,topDock,bottomDock,DOCKfilelist\\,DOCKoperator,DOCKfilelist\\,DOCKoperator\\,mainDock Version=0.0.5 bottomDock:geometry=0,0,700,33 bottomDock:stayButton=false bottomDock:type=NULL_DOCK bottomDock:visible=false leftDock:geometry=0,0,24,418 leftDock:stayButton=false leftDock:type=NULL_DOCK leftDock:visible=false mainDock,DOCKconsole:first_name=mainDock mainDock,DOCKconsole:last_name=DOCKconsole mainDock,DOCKconsole:orientation=0 mainDock,DOCKconsole:parent=yes mainDock,DOCKconsole:sepPos=20 mainDock,DOCKconsole:stayButton=false mainDock,DOCKconsole:type=GROUP mainDock:stayButton=false mainDock:type=DOCK rightDock:geometry=0,0,88,85 rightDock:stayButton=false rightDock:type=NULL_DOCK rightDock:visible=false topDock:geometry=0,0,114,65 topDock:stayButton=false topDock:type=NULL_DOCK topDock:visible=false [fileselector] AutoSyncEvents=0 current filter= dir history=/home/trevor/arttoday/,/home/trevor/african-friends/,/home/trevor/ipaq/article/code/code/servo-controller/ filter history= filter history len=9 last filter= location=/home/trevor/arttoday/lkasjdl pathcombo history len=9 [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=Simple --Boundary-00=_vw6+9KE2Gx4hFSE--