Odd crash (is it CppSupportPart or ProblemReporter at fault?)

Andras Mantia amantia at kde.org
Fri Dec 15 09:03:51 UTC 2006


On Friday 15 December 2006 02:07, Matthew Woehlke wrote:
> > - fix the CppSupportPart::slotSaveMemory to deal with this case
>
> That seems like the solution I would have come up with. Something
> like 'don't do this while my constructor is running'. It's on the
> second line of constructor so this should be feasible.

Ok, I think I found the reason of the crash. Probably at the time when 
the timeout is fired, the m_backgroundParser from CppSupportPart is not 
yet initialized. This is beacuse CppSupportPart::projectOpened() 
creates a backgroundparser, which creates a KDevDriver in the 
constructor, which starts the event loop, timers are handled in the 
event loop, so a timer in the CppSupportPart is fired, which accesses 
m_backgroundParser, which is not yet initialized...

I have two suggestion for you to try out:

1)- init m_backgroundParser to 0L in the constructor of CppSupportPart 
somewhere before the m_saveMemoryTimer is initialized
2)- disable this timer before initializing m_backgroundParser in 
CppSupportPart::projectOpened(). (delete and recreate it for example)

Try first the 1) and if it doesn't help 2). I'd try it, but I don't know 
how to reproduce the crash. ;-)

Andras


-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20061215/e85fcc04/attachment.sig>


More information about the KDevelop-devel mailing list