Bug 122497: crash when a non existing data type is used for an argument of a new mehod (crash)
Opened:2006-02-22 17:00
Product:umbrello
Component:general
Version:unspecified
Status:RESOLVED
Platform:Debian testing
Resolution:FIXED
Reporter:Aurélien
Assigned to:Umbrello Development Group

Version:           1.5.1 (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

In an empty project, create a new class. Then add an operation, like:
new_operation(a : char *)

Then a message saying that the type does not exist pops up (which is correct) and, after clicking, the application crashes.

Note: if one does the same in two steps: (1) create an operation and (2) add an argument of a non existing type, the same error is correctly reported and the system does NOT crash.


------- Additional Comment #1 From Oliver Kellogg 2006-03-10 21:23 -------
SVN commit 517371 by okellogg:

createChildUMLObject(), itemRenamed(): Deletion of the UMLListViewItem
is done at the caller, UMLListViewItem::okRename().
BUG:122497


 M  +0 -6      umllistview.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #517370:517371
 at  at  -2256,7 +2256,6  at  at
                         kapp -> mainWidget(),
                         i18n( "The name you entered was not unique.\nIs this what you wanted?" ),
                         i18n( "Name Not Unique" ), i18n("Use Name"), i18n("Enter New Name") ) == KMessageBox::No ) {
-                delete item;
                 return false;
             }
         } else {
 at  at  -2416,7 +2415,6  at  at
     if( !parent ) {
         kdError() << "UMLListView::createChildUMLObject: parent UMLObject is NULL"
         << endl;
-        delete item;
         m_bCreatingChildObject = false;
         return false;
     }
 at  at  -2431,7 +2429,6  at  at
             KMessageBox::error( kapp->mainWidget(),
                                 Model_Utils::psText(st),
                                 i18n("Creation canceled") );
-            delete item;
             m_bCreatingChildObject = false;
             return false;
         }
 at  at  -2447,7 +2444,6  at  at
             KMessageBox::error( kapp->mainWidget(),
                                 Model_Utils::psText(st),
                                 i18n("Creation canceled") );
-            delete item;
             m_bCreatingChildObject = false;
             return false;
         }
 at  at  -2465,7 +2461,6  at  at
             KMessageBox::error( kapp->mainWidget(),
                                 Model_Utils::psText(st),
                                 i18n("Creation canceled") );
-            delete item;
             m_bCreatingChildObject = false;
             return false;
         }
 at  at  -2477,7 +2472,6  at  at
                     kapp -> mainWidget(),
                     i18n( "The name you entered was not unique!\nCreation process has been canceled." ),
                     i18n( "Name Not Unique" ) );
-            delete item;
             m_bCreatingChildObject = false;
             return false;
         }


------- Additional Comment #2 From Oliver Kellogg 2006-03-26 14:51 -------
*** Bug 124278 has been marked as a duplicate of this bug. ***


Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:


View Bug Activity   |   Format For Printing


Attachment Type Modified Status Actions
Create a New Attachment (proposed patch, testcase, etc.) View All


Actions: Query | Reports Search:   New Account | Log In