Bug 62137 - crash while editing text during compile
Summary: crash while editing text during compile
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: editor integration (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
: 66653 70135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-04 22:52 UTC by Andreas Koepfle
Modified: 2008-08-23 22:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
crash backtrace (1.19 KB, text/plain)
2003-08-04 22:53 UTC, Andreas Koepfle
Details
debug output on console (3.96 KB, text/plain)
2003-08-04 22:54 UTC, Andreas Koepfle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Koepfle 2003-08-04 22:52:33 UTC
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.
Comment 1 Andreas Koepfle 2003-08-04 22:53:55 UTC
Created attachment 2151 [details]
crash backtrace
Comment 2 Andreas Koepfle 2003-08-04 22:54:40 UTC
Created attachment 2152 [details]
debug output on console
Comment 3 Thiago Macieira 2003-08-04 23:17:49 UTC
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 
 
Comment 4 Amilcar do Carmo Lucas 2003-08-05 09:33:59 UTC
This looks like a KATE problem. 
Comment 5 Jens Dagerbo 2003-11-03 01:33:38 UTC
This could be related to the initial problems with the threaded background parser. Could you confirm that the problem is gone?
Comment 6 Andreas Koepfle 2003-11-03 03:53:57 UTC
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.
Comment 7 Jens Dagerbo 2003-11-03 04:23:16 UTC
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?
Comment 8 Andreas Koepfle 2003-11-03 12:20:01 UTC
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.
Comment 9 Hamish Rodda 2003-11-28 12:48:22 UTC
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.
Comment 10 Andreas Koepfle 2003-12-02 18:50:22 UTC
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?!)




Comment 11 Jens Dagerbo 2003-12-17 00:50:58 UTC
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.
Comment 12 Jens Dagerbo 2003-12-17 00:52:42 UTC
*** Bug 70135 has been marked as a duplicate of this bug. ***
Comment 13 Jens Dagerbo 2003-12-17 01:02:58 UTC
*** Bug 66653 has been marked as a duplicate of this bug. ***
Comment 14 Christoph Cullmann 2003-12-22 17:25:44 UTC
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 ;)