Bug 129772

Summary: crash memory exhausted code import c++
Product: [Applications] umbrello Reporter: Stephen Berryman <berrymansj>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Stephen Berryman 2006-06-25 06:45:04 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Fedora RPMs

When importing the following class header, all memory is used up and the application eventually killed. The problem seems to be with the self referencing typedef.

Version 1.5.3 seems to get a segv on nearly every import so I can't test this particular problem on it. version 1.5.2 and previous version do have this problem

#ifndef _NAMEDCLASS_H
#define _NAMEDCLASS_H


class NamedClass 
{
public:
	typedef NamedClass* (*Constructor)();

	NamedClass(){};

	static NamedClass* make(const string& aClassName);

protected:

	static const char* registerClass
	(
		const char* pClassName, 
		Constructor constructor
	);

};
Comment 1 Oliver Kellogg 2006-06-25 09:30:09 UTC
> Version 1.5.3 seems to get a segv on nearly every import
> so I can't test this particular problem on it.

There are some fundamental problems with the new code generators,
see bugs 84739 and 125331.
Try disabling "Use new C++/Java/Ruby code generators" in the
General Settings.
Comment 2 Oliver Kellogg 2007-02-08 07:19:48 UTC
Does not crash with 1.5.6 but gives many errors like this:

ERROR: findUMLObject(Constructor): breaking out of cycle involving NamedClass
ERROR: findUMLObject(Constructor): breaking out of cycle involving NamedClass
ERROR: findUMLObject(Constructor): breaking out of cycle involving NamedClass


*** This bug has been marked as a duplicate of 112466 ***