Bug 68143 - cpp code-completion within namesapce defined in file AND in method implementation
Summary: cpp code-completion within namesapce defined in file AND in method implementa...
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-13 22:26 UTC by Serge Lussier
Modified: 2004-01-21 05:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Lussier 2003-11-13 22:26:52 UTC
Version:           Beta 1 (using KDE KDE 3.1.4)
Installed from:    Unspecified Linux
Compiler:          gcc 3.x 
OS:          Linux

hi there,

I am not really sure how to call it because of my limited english skill...Anyway - here below the example describing the problem:

in the .h include file.
namespace ns{
   class aClass{
      blah...blah...
      void aMethod();
   };//aClass
}; //namespace ns

----------------
In the impl. .cpp file:

#include "aclass.h"

...
namespace ns{

aClass::aClass() 
{
...
}

void ns::aClass::aMethod()
{
  this->... /// crash kdevelop as explained below
}

}; // namespace ns

the construct "ns::aClass::aMethod()" cause the cppcomppletion to crash KDevelop because of scoping the namespace twice.

In fact, aClass:aMethod would be generated by the class utility with the ns:: scope at the very end of the impl. file -- outside the namespace { }; delemiters. that is correct:-) but somtime I prefer to put back the method's code inside the ns{ }; block and forget to remove the ns:: scoping on aClass::aMethod. Thus the cppcodecompletion loops until all the application ram/stack space is exausted and then...crash ;-)

I suspect the codecompletion engine uses a recursive loop with some missing checkpoints... ;-)
Comment 1 Jens Dagerbo 2003-11-13 23:07:46 UTC
This was tried by several people in #kdevelop using latest CVS, neither could reproduce a crash.

Roberto claims to have fixed a problem resembling this some time ago. Your report says you're running beta1.. Are you sure? :)

If the problem persists.. Is it only with this project? Does removing the projects .pcs file and letting KDevelop reparse the entire project help?
Comment 2 Amilcar do Carmo Lucas 2003-11-23 13:45:27 UTC
Serge If I don't get an answer from you I'm going to close this one!
Comment 3 Jens Dagerbo 2003-12-30 22:05:35 UTC
Not reproducible. No reply. No use keeping it open. Closing.
Comment 4 Serge Lussier 2004-01-21 05:22:24 UTC
I am far too late because of my new job and was incoming new born son :-)))))))...
Thus, yes I forgot to reply to the closing call. but it is not me who will
try to stop the releases of Kdevelop rc1. It is so much wonderful so if I encounter 
this little crash-bug again I will report it with more details if I can :-)
Serge