[Bug 82169] New: Crash because of inheritance loop
Christoph Bartoschek
bartoschek at gmx.de
Tue May 25 15:41:03 UTC 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=82169
Summary: Crash because of inheritance loop
Product: kdevelop
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: crash
Priority: NOR
Component: general
AssignedTo: kdevelop-devel kdevelop org
ReportedBy: bartoschek gmx de
Version: (using KDE KDE 3.2.2)
Installed from: Compiled From Sources
Compiler: g++ 3.4.0
OS: Linux
Today I made the mistake to write a class which inherits itself. First I did not recognice the problem and tried to call a method of the class. Each time I wrote instance. kdevelop crashed, when instance was an object of my class.
I think my class created a cycle in the CodeCompletition Class Store. During the search for all member methods of my class a endless loop was entered and left after stack or heap exhaustion.
Here is how to reproduce the problem:
1. Start a console "Hello World" C++ Project.
2. Add a new file Header.H
3. Insert the following code into the new file:
class Murti : public Murti
{
public:
static int size();
};
4. Save the file.
5. Go to the main file and type into the main function:
int main() {
Murti a;
a.
}
After you type the dot kdevelop begins to calculate and eventually crashes.
You can also write Murti:: and it crashes. I think it does not matter where you write Murti::, it will crash.
kdevelop should not crash because of such an error. However it would be better if the parser
recognized the error and indicated it to the programmer.
More information about the KDevelop-devel
mailing list