[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
Fri Nov 28 20:24:42 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=204035
Ralf Habacker <ralf.habacker at freenet.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |CONFIRMED
--- Comment #11 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to Ralf Habacker from comment #9)
> The function mentioned in the last stack frame is shown below:
>
> bool JavaClassifierCodeDocument::addCodeOperation (CodeOperation * op)
> {
> if(!op->getParentOperation()->isLifeOperation())
> return operationsBlock->addTextBlock(op);
> else
> return constructorBlock->addTextBlock(op);
> }
>
> There may be three places where a crash can happen:
> 1. op->getParentOperation() == 0
> 2. operationsBlock == 0
> 3. constructorBlock == 0
With selected umbrello setting "Use new C++/Java/Ruby generators" the above
mentioned crash happens because of case 2. and 3.
With unselected umbrello setting "Use new C++/Java/Ruby generators" the above
mentioned crash happens in
void JavaClassDeclarationBlock::updateContent ()
{
JavaClassifierCodeDocument *parentDoc =
dynamic_cast<JavaClassifierCodeDocument*>(getParentDocument());
because parentDoc is zero and not guarded later.
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy *commonPolicy = UMLApp::app()->commonPolicy();
QString endLine = commonPolicy->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
QString JavaClassName = parentDoc->getJavaClassName(c->name());
The top related backtrace part is
#0 0x00007ffff404224a in __dynamic_cast () from /usr/lib64/libstdc++.so.6
#1 0x0000000000524b72 in JavaClassDeclarationBlock::updateContent
(this=0x164f690) at /home/ralf/src/umbrello-14.12/umbrello/codegenerators
/java/javaclassdeclarationblock.cpp:53
#2 0x00007ffff469db38 in QMetaObject::activate (sender=sender at entry=0x10cab90,
m=m at entry=0x6fa720 <UMLObject::staticMetaObject>,
local_signal_index=local_signal_index at entry=0, argv=argv at entry=0x0) at
kernel/qobject.cpp:3576
#3 0x0000000000657e6e in UMLObject::modified (this=this at entry=0x10cab90) at
/home/ralf/src/umbrello-14.12-build/umbrello/umlobject.moc:145
No locals.
#4 0x0000000000657eaf in UMLObject::emitModified (this=this at entry=0x10cab90)
at /home/ralf/src/umbrello-14.12/umbrello/umlobject.cpp:354
umldoc = <optimized out>
#5 0x00000000005f5907 in UMLClassifier::addOperation
(this=this at entry=0x10cab90, op=op at entry=0x1384c00, position=position at entry=-1)
at /home/ralf/src/umbrello-14.12/umbrello/classifier.cpp:338
__PRETTY_FUNCTION__ = "bool UMLClassifier::addOperation(UMLOperation*,
int)"
#6 0x00000000005f5dac in UMLClassifier::createOperation
(this=this at entry=0x10cab90, name=..., isExistingOp=isExistingOp at entry=0x0,
params=params at entry=0x0) at
/home/ralf/src/umbrello-14.12/umbrello/classifier.cpp:294
#7 0x000000000061ecfd in Object_Factory::createChildObject
(parent=parent at entry=0x10cab90, type=type at entry=UMLObject::ot_Operation,
name=...) at /home/ralf/src/umbrello-14.12/umbrello/object_factory.cpp:308
#8 0x00000000005bf0a3 in ClassifierWidget::slotMenuSelection (this=0x10c6ad0,
action=<optimized out>) at
/home/ralf/src/umbrello-14.12/umbrello/widgets/classifierwidget.cpp:1278
#9 0x00000000005e7be0 in WidgetBase::contextMenuEvent (this=<optimized out>,
event=0x7fffffffd1b0) at
/home/ralf/src/umbrello-14.12/umbrello/widgets/widgetbase.cpp:746
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list