| Summary: | crash on exit after loading phonon design.xmi | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | Oliver Kellogg <okellogg> |
| Component: | general | Assignee: | Oliver Kellogg <okellogg> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 4.0.0 | |
| Sentry Crash Report: | |||
|
Description
Oliver Kellogg
2007-08-29 22:37:59 UTC
Filed twice. See bug 149357. Clarification: The crash does not happen on loading but on exiting after the XMI file was loaded. The stack trace given in comment #1 remains valid. Hmph, I always forget to mention that it only happens when the advanced code generators are enabled To my amazement I discover that this also happens without the advanced code generators enabled. (But otherwise, the advanced code generators are still terribly crashy.) SVN commit 707073 by okellogg:
removeAllAssociationEnds(): I tried different iteration schemes (e.g. using
UMLObjectListIt or UMLObjectList::iterator) but the only one that works for me
without crashing is this here, using the integer index and QList::removeAt().
BUG:149356
M +2 -1 ChangeLog.2
M +5 -10 umbrello/umlcanvasobject.cpp
--- trunk/KDE/kdesdk/umbrello/ChangeLog.2 #707072:707073
@@ -15,7 +15,7 @@
* Found / Lost Messages.
- Sequence Diagram
* Pre/Post conditions.
- * ‘accept time event’ symbol.
+ * "accept time event" symbol.
* Control Flow.
* Object Flow.
* interruptible region.
@@ -31,4 +31,5 @@
* RMB LogicalView->New->Class in treeview creates TWO classes (144537)
* New code generator for D language
* Add option for automatic drawing attribute associations in class diagram (147061)
+* Crash on exit after loading phonon design.xmi (149356)
* Crash on saving phonon design.xmi with Advanced Code Generators enabled (149357)
--- trunk/KDE/kdesdk/umbrello/umbrello/umlcanvasobject.cpp #707072:707073
@@ -98,16 +98,11 @@
}
void UMLCanvasObject::removeAllAssociationEnds() {
- UMLObject *o = NULL;
- for (UMLObjectListIt oit(m_List); oit.hasNext(); ) {
- o = oit.next();
+ for (int i = 0; i < m_List.count(); ) {
+ UMLObject *o = m_List.at(i);
if (o->getBaseType() != Uml::ot_Association) {
- if ( oit.hasNext() ) {
- o = oit.next();
- continue;
- } else {
- break;
- }
+ ++i;
+ continue;
}
UMLAssociation *assoc = static_cast<UMLAssociation*>(o);
//umldoc->slotRemoveUMLObject(assoc);
@@ -133,7 +128,7 @@
else
kDebug() << "UMLCanvasObject::removeAllAssociations(" << m_Name
<< "): objB is NULL" << endl;
- m_List.remove(assoc);
+ m_List.removeAt(i);
}
}
set version-fixed-in from 4.0.0 changelog |