Summary: | kate crashes immediately after startup | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Sebastian Voitzsch <sebastian> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | davebenson |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
testcase
Fix for kdebase/kate/app/katefileselector.cpp - setDir Another katerc testcase that causes a crash on startup |
Description
Sebastian Voitzsch
2002-12-01 15:59:59 UTC
Interesting backtrace. can anybody send me a katerc that causes this? Created attachment 580 [details]
testcase
Well, this is a kate configuration from a kde3 system. But I found that the bug
only occurs when a strange combination of old and new files are there (can
Created attachment 615 [details]
Fix for kdebase/kate/app/katefileselector.cpp - setDir
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.
Anders Lund has agreed to review and apply if OK.
I'm surprised many people haven't 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.)
Created attachment 617 [details]
Another katerc testcase that causes a crash on startup
This katerc was left over from my previous CVS installation of KDE. It causes a
crash on startup using KDE 3.1-RC5:
[New Thread 8192 (LWP 29769)]
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 <signal handler called>
#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<QTab>::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=0x8170750, index=1)
at widgets/qtabwidget.cpp:906
#10 0x405a0eda in KDockManager::readConfig(KConfig*, QString) (this=0x812d270,
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=0x8118a98,
config=0x8052c28) at katemainwindow.cpp:422
#13 0x4006547f in KateMainWindow (this=0x8118a98, _m_docManager=0xfffffe00,
_m_pluginManager=0xfffffe00, projectMan=0xfffffe00)
at katemainwindow.cpp:143
#14 0x40052b50 in KateApp::newMainWindow() (this=0xbffff760) at kateapp.cpp:204
#15 0x400517bf in KateApp (this=0xbffff760, forcedNewProcess=false,
oldState=false) at kateapp.cpp:68
#16 0x40014324 in main (argc=1, argv=0xbffff914) at katemain.cpp:106
#17 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
The problem has to do with loading the tab configuration and displaying the
tabs, but I'm not sure exactly what's happening here.
It's possible that this katerc was a bastard child of my old installation and
is no longer an issue because it will never be created again. On the other
hand, it could be indicative of a bug in kate that might pop up again later.
Whatever the reason, I've spent a couple hours trying to track it down and have
given up. It's much easier just to delete the config file and let kate generate
a new one.
should work with current CVS and 3.1, if you get again a similar crash, please report again and sorry for the problems |