Code completion crash

Vladimir Prus ghost at cs.msu.su
Sat Oct 14 19:33:12 UTC 2006


Hi, 
I just got the following crash, with up-to-date SVN state of 3.4 branch:

#6  0xb55eabf4 in CppSupportPart::slotParseFiles (this=0x8aea210)
    at cppsupportpart.cpp:1305
#7  0xb55ed3c4 in CppSupportPart::qt_invoke (this=0x8aea210, _id=35, 
    _o=0xbff2cb58) at cppsupportpart.moc:273
#8  0xb67cdeb9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0xb6b6129a in QSignal::signal () from /usr/lib/libqt-mt.so.3
#10 0xb67eb630 in QSignal::activate () from /usr/lib/libqt-mt.so.3
#11 0xb67f3120 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#12 0xb6763e56 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#13 0xb6764052 in QApplication::notify () from /usr/lib/libqt-mt.so.3

The code in question is:

void CppSupportPart::slotParseFiles()
{
	// NOTE: The checking for m_projectClosed is actually (currently) not needed.
	// When the project is closed, the language support plugin is destroyed
	// and as a consequence, the timer job signal never arrives at this method


	if ( _jd->cycle == 0 && !m_projectClosed && _jd->it != _jd->files.end() )
	{


The crash happened when closing a project. The only reason, IMO, for this code 
to crash would be either _jd being 0, or already destroyed, or the entire 
part being destroyed. Anybody can suggest a fix?

- Volodya




More information about the KDevelop-devel mailing list