[umbrello-devel] [umbrello] [Bug 204035] Crash when trying to create a function of the type Vector<package.class>. (JavaClassifierCodeDocument::addCodeOperation)

Ralf Habacker ralf.habacker at freenet.de
Thu Dec 4 11:18:23 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=204035

--- Comment #16 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Oliver Kellogg from comment #15)
> (In reply to Ralf Habacker from comment #11)
> > [...]
> > With unselected umbrello setting "Use new C++/Java/Ruby generators"  the
> > above mentioned crash happens in  
> > 
> > void JavaClassDeclarationBlock::updateContent ()
> 
> Yikes, this sounds very wrong!
> When using the "old" Java generator (JavaWriter) there should be no
> JavaClassDeclarationBlock constructed at all. In fact only a JavaWriter
> object should exist; none of the other classes of
> umbrello/codegenerators/java/ should exist.

Unfortunally I could not reproduce this crash yet, but looking at the code
there is at least a resource leak with "use new code generators"  in 

QStringList CodeTextHighlighter::keywords()
{
    Uml::ProgrammingLanguage::Enum pl = UMLApp::app()->activeLanguage();
!!!    CodeGenerator* generator = CodeGenFactory::createObject(pl);
    QStringList keywordList = generator->reservedKeywords();

With java as active language a new ClassifierCodeDocument instance is created,
which connects an UMLClassifier instance to
ClassifierCodeDocument::syncToParent(). 

classifiercodedocument.cpp:446
      connect(c, SIGNAL(modified()), this, SLOT(syncToParent()));

but the generator is never freed. After changing to "use old code generators"
this connection (and others) are still present and may result into unwanted
calls. 

BTW: This leak has not been detected by coverige.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Make the world a better place. Donate to our year end fundraiser https://www.kde.org/fundraisers/yearend2014/


More information about the umbrello-devel mailing list