Version: kdevelop 3.0.0a5 cvs (using KDE KDE 3.1.2) Installed from: SuSE RPMs Compiler: gcc 3.3 prerelease OS: Linux gideon (cvs from Aug 4th) crashed while I was editing text when running a compilation in the background. I cannot reproduce this exactly, but it has happened several times to me - however this is the first time the crashmanager came up to allow a crash backtrace. I append this crash backtrace and the last debug output on the console.
Created attachment 2151 [details] crash backtrace
Created attachment 2152 [details] debug output on console
Pasting the backtrace inline to allow searches for similar crashes: [New Thread 16384 (LWP 12455)] [New Thread 32769 (LWP 12521)] [New Thread 16386 (LWP 12522)] 0x413ba3ba in waitpid () from /lib/libpthread.so.0 #0 0x413ba3ba in waitpid () from /lib/libpthread.so.0 #1 0x40ad1029 in KCrash::defaultCrashHandler(int) () from /opt/kde3/lib/libkdecore.so.4 #2 0x413b91ec in __pthread_sighandler () from /lib/libpthread.so.0 #3 <signal handler called> #4 0x42bab0cf in KateBuffer::text() () from /opt/kde3/lib/kde3/libkatepart.so #5 0x42bc40af in KateDocument::text() const () from /opt/kde3/lib/kde3/libkatepart.so #6 0x42778825 in KDevSourceProvider::contents(QString const&) ( this=0x893a298, fileName=@0x42f18a7c) at backgroundparser.cpp:70 #7 0x428c0934 in Driver::parseFile(QString const&, bool, bool) ( this=0x8665180, fileName=@0x42f18a7c, onlyPreProcess=false, force=false) at driver.cpp:243 #8 0x4277698c in BackgroundParser::parseFile(QString const&) (this=0x9329540, fileName=@0x42f18a7c) at backgroundparser.cpp:174 #9 0x42776d80 in BackgroundParser::run() (this=0x9329540) at backgroundparser.cpp:245 #10 0x40dee468 in QProc::~QProc() () from /usr/lib/qt3/lib/libqt-mt.so.3 #11 0x413b3d80 in pthread_start_thread () from /lib/libpthread.so.0
This looks like a KATE problem.
This could be related to the initial problems with the threaded background parser. Could you confirm that the problem is gone?
No, I can't confirm. I'm still experiencing this type of random crashes. Last time 2 weeks ago with kdevelop built from CVS on October 20th. Contrary to my original bug report, the crash seems to be independant from the parallel compilation. It also happens when just editing text.
Thanks for the feedback. Are all crashes with this backtrace? All comes from the background parser? Are you by any chance on a multi-cpu system?
Yes, it's always the same backtrace. It's the most common crash I encounter when working with kdevelop. Unfortunately I haven't found a way to trigger it, it just seems to happen randomly while doing some changes to the text buffer in kate part. Yes, it's a P4 CPU with hyperthreading enabled, I guess that's multi-cpu.
I tend to think that this is a kdevelop problem. Kate is not thread-safe, and if the only reporter is using SMP (which certainly seems to be the case) this is likely to be a bug caused by typing into the editor at the same time in which the background parser grabs the text. Any chance you could recompile kdelibs/kate/part with --enable-debug=full, Andreas? And try to reproduce the problem with one of the other editors, eg. qeditor? Thanks.
Subject: Re: crash while editing text during compile I also think it's something multihread/SMP related, as these crashes only happen while actively editing the text. I'm working with KDE 3.1.4 SuSE RPMs. Is it enough to just get the KDE 3.1.4 katepart source and then recompile it with enable-debug? I don't want to compile all of KDE core or even CVS, as this is a production machine used for my daily work. Same reason I don't want to switch editors (I really got accustomed to kate) and the crash doesn't occur that frequently (maybe once every 10 days working almost fulltime with kdevelop) However a co-worker is using qeditor and he has also seen crashes while editing on a smp machine (I try to get a backtrace from him to check if it's indeed the same type of crash) He also told me he thinks it happens much more frequently when editing header-files (perhaps another hint to the background parser?!)
Andreas, please update to latest CVS. We found something recently that might be the problem you've been having. I'd be very curios to hear the result.
*** Bug 70135 has been marked as a duplicate of this bug. ***
*** Bug 66653 has been marked as a duplicate of this bug. ***
the new locking in the background parser should fix that, reopen it please if somebody gets again probs with current CVS versions of kdevelop, than we need to look at that again ;)