Version: unknown (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED) Compiler: gcc version 3.3.4 (pre 3.3.5 20040809) OS: Linux (x86_64) release 2.6.8-24.11-smp I've regenerated the CTags database for a 10K file C/C++ project, and tried using the CTags plugin to search for the symbol "ServerProcess". As soon as I typed a capital S (while Shift was pressed), KDevelop crashed with the stack trace shown below. Havign restarted, I tried typing in a lowercase s - nothing crashes. As soon as I typed an uppercase S again, Kdeveloper crashed again. Tried deleting and regenerating the CTags database - no joy. Tried searching for other uppercase letters - no crashes. Using host libthread_db library "/lib64/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [KCrash handler] #3 0x0000002a9fd9cb60 in parseTagLine () from /opt/kde3/lib64/kde3/libkdevctags2.so #4 0x0000002a9fd9cdcd in readNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #5 0x0000002a9fd9ce0b in tagsNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #6 0x0000002a9fd9ce65 in tagsFindNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #7 0x0000002a9fda0bce in Tags::numberOfMatches () from /opt/kde3/lib64/kde3/libkdevctags2.so #8 0x0000002a9fda0bfe in Tags::numberOfPartialMatches () from /opt/kde3/lib64/kde3/libkdevctags2.so #9 0x0000002a9fda0c2c in CTags2Widget::calculateHitCount () from /opt/kde3/lib64/kde3/libkdevctags2.so #10 0x0000002a9fda1579 in CTags2Widget::line_edit_changed_delayed () from /opt/kde3/lib64/kde3/libkdevctags2.so #11 0x0000002a9fd9dd74 in CTags2WidgetBase::qt_invoke () from /opt/kde3/lib64/kde3/libkdevctags2.so #12 0x0000002a9fda2d14 in CTags2Widget::qt_invoke () from /opt/kde3/lib64/kde3/libkdevctags2.so #13 0x0000002a98f5e909 in QObject::activate_signal () from /usr/lib/qt3/lib64//libqt-mt.so.3 #14 0x0000002a98f5eb95 in QObject::activate_signal () from /usr/lib/qt3/lib64//libqt-mt.so.3 #15 0x0000002a99246395 in QLineEdit::textChanged () from /usr/lib/qt3/lib64//libqt-mt.so.3 #16 0x0000002a990165b5 in QLineEditPrivate::finishChange () from /usr/lib/qt3/lib64//libqt-mt.so.3 #17 0x0000002a99016e0c in QLineEdit::insert () from /usr/lib/qt3/lib64//libqt-mt.so.3 #18 0x0000002a99017720 in QLineEdit::keyPressEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #19 0x0000002a98f8d5ed in QWidget::event () from /usr/lib/qt3/lib64//libqt-mt.so.3 #20 0x0000002a99016b57 in QLineEdit::event () from /usr/lib/qt3/lib64//libqt-mt.so.3 #21 0x0000002a98f06c2d in QApplication::internalNotify () from /usr/lib/qt3/lib64//libqt-mt.so.3 #22 0x0000002a98f08949 in QApplication::notify () from /usr/lib/qt3/lib64//libqt-mt.so.3 #23 0x0000002a9837134c in KApplication::notify () from /opt/kde3/lib64/libkdecore.so.4 #24 0x0000002a98ea4a83 in QETWidget::translateKeyEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #25 0x0000002a98eafeef in QApplication::x11ProcessEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #26 0x0000002a98ebe653 in QEventLoop::processEvents () from /usr/lib/qt3/lib64//libqt-mt.so.3 #27 0x0000002a98f1c2f1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64//libqt-mt.so.3 #28 0x0000002a98f1c162 in QEventLoop::exec () from /usr/lib/qt3/lib64//libqt-mt.so.3 #29 0x0000002a98f08475 in QApplication::exec () from /usr/lib/qt3/lib64//libqt-mt.so.3 #30 0x000000000040808d in main () Using host libthread_db library "/lib64/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [Thread debugging using libthread_db enabled] [New Thread 182988493600 (LWP 1149)] [New Thread 1075837280 (LWP 1483)] [KCrash handler] #3 0x0000002a9fd9cb60 in parseTagLine () from /opt/kde3/lib64/kde3/libkdevctags2.so #4 0x0000002a9fd9cdcd in readNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #5 0x0000002a9fd9ce0b in tagsNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #6 0x0000002a9fd9ce65 in tagsFindNext () from /opt/kde3/lib64/kde3/libkdevctags2.so #7 0x0000002a9fda0bce in Tags::numberOfMatches () from /opt/kde3/lib64/kde3/libkdevctags2.so #8 0x0000002a9fda0bfe in Tags::numberOfPartialMatches () from /opt/kde3/lib64/kde3/libkdevctags2.so #9 0x0000002a9fda0c2c in CTags2Widget::calculateHitCount () from /opt/kde3/lib64/kde3/libkdevctags2.so #10 0x0000002a9fda1579 in CTags2Widget::line_edit_changed_delayed () from /opt/kde3/lib64/kde3/libkdevctags2.so #11 0x0000002a9fd9dd74 in CTags2WidgetBase::qt_invoke () from /opt/kde3/lib64/kde3/libkdevctags2.so #12 0x0000002a9fda2d14 in CTags2Widget::qt_invoke () from /opt/kde3/lib64/kde3/libkdevctags2.so #13 0x0000002a98f5e909 in QObject::activate_signal () from /usr/lib/qt3/lib64//libqt-mt.so.3 #14 0x0000002a98f5eb95 in QObject::activate_signal () from /usr/lib/qt3/lib64//libqt-mt.so.3 #15 0x0000002a99246395 in QLineEdit::textChanged () from /usr/lib/qt3/lib64//libqt-mt.so.3 #16 0x0000002a990165b5 in QLineEditPrivate::finishChange () from /usr/lib/qt3/lib64//libqt-mt.so.3 #17 0x0000002a99016e0c in QLineEdit::insert () from /usr/lib/qt3/lib64//libqt-mt.so.3 #18 0x0000002a99017720 in QLineEdit::keyPressEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #19 0x0000002a98f8d5ed in QWidget::event () from /usr/lib/qt3/lib64//libqt-mt.so.3 #20 0x0000002a99016b57 in QLineEdit::event () from /usr/lib/qt3/lib64//libqt-mt.so.3 #21 0x0000002a98f06c2d in QApplication::internalNotify () from /usr/lib/qt3/lib64//libqt-mt.so.3 #22 0x0000002a98f08949 in QApplication::notify () from /usr/lib/qt3/lib64//libqt-mt.so.3 #23 0x0000002a9837134c in KApplication::notify () from /opt/kde3/lib64/libkdecore.so.4 #24 0x0000002a98ea4a83 in QETWidget::translateKeyEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #25 0x0000002a98eafeef in QApplication::x11ProcessEvent () from /usr/lib/qt3/lib64//libqt-mt.so.3 #26 0x0000002a98ebe653 in QEventLoop::processEvents () from /usr/lib/qt3/lib64//libqt-mt.so.3 #27 0x0000002a98f1c2f1 in QEventLoop::enterLoop () from /usr/lib/qt3/lib64//libqt-mt.so.3 #28 0x0000002a98f1c162 in QEventLoop::exec () from /usr/lib/qt3/lib64//libqt-mt.so.3 #29 0x0000002a98f08475 in QApplication::exec () from /usr/lib/qt3/lib64//libqt-mt.so.3 #30 0x000000000040808d in main ()
Hmm.. Does it work at all and the crash is a special case? Do you have any hits from the lowercase 's'? Is the problem specific to this project, or does the same problem occur on all projects? Can you look up the "ServerProcess" string via the context menu without crashing? What exuberant-ctags version are you using? Are you using a custom tags database creation command?
Hi Jens. Thanks for the prompt response. It works most of the time. The crash seems to be a special case - thought I've only checked about 10 letters of the English alphabet :-) The project gives 1570 hits for the lowercase 's'. The crash occurs in all projects that I've got - represent 3 successive releases of the same applications, and are thus roughly the same in size/structure (~10K files). Looking up "ServerProcess" via the context menu works like a treat. And I do not use a custom tags database creation command - - just whatever is the default for Kdevelop 3.2.0. $ ctags --version Exuberant Ctags 5.5.4, Copyright (C) 1996-2003 Darren Hiebert Compiled: Oct 2 2004, 02:56:44 Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex
Created attachment 11649 [details] ctags index file
Hi. I confirme a bug with ctags, but it depends on content of index file generated by ctags rather than number of tags. I have a project with 17k files, ctags index file has 700k rows. I see a crash only which letters: T, C, M. Other words work well. I attache a ctag index with only one tag (started with T letter) that cause kdeveloper to crash. The problem is with two backslashes ("\\") in the tag row. If I remove them kdevelop works well.
Wow, a perfect testcase! :) Debugging through the crash confirms what would be suspected from the posted backtrace: The bug is in the readtags.c file supplied by Exuberant Ctags which we use to read its database. It should be easy to stop the bug from crashing us now, but it will leave the lookup algorithm "lossy". The real problem here is that Exuberant Ctags creates a database that it itself finds to contain "invalid patterns".
Maciej, could you please paste full source line that results in that entry in the ctags database? I'm curious to see what causes ctags to generate faulty entries.
Fixed (workaround) with SVN commit 437861 in trunk.