Bug 145202 - crash when moving all elements in a sequence diagram
Summary: crash when moving all elements in a sequence diagram
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-08 21:18 UTC by tonton
Modified: 2007-05-09 20:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
full backtrace (29.73 KB, text/plain)
2007-05-08 21:23 UTC, tonton
Details
Fix for this bug (514 bytes, patch)
2007-05-08 23:36 UTC, tonton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonton 2007-05-08 21:18:49 UTC
Version:           1.5.6 (using KDE KDE 3.5.6)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 4.1.2 debian unstable
OS:                Linux

When moving all the elements in a sequence diagram, umbrello eats all available memory and crash with a bad_alloc exception. I'm unable to reproduce this bug on a 32 bits system, but it crashes all the time on my 64 bits core 2 duo, even with a svn snapshot.

How to reproduce :
- limit the memory available for the program to not freeze your system (ulimit -v 500000)
- launch umbrello --nocrashhandler
- create a sequence diagram
- create three objects
- connect the 1st object to the 2nd, and the 2nd to the 3rd (the type of message is not important)
- select everything on the sheet
- try to move all the objects
- crash

Backtrace is attached.
Comment 1 tonton 2007-05-08 21:23:22 UTC
Created attachment 20516 [details]
full backtrace
Comment 2 tonton 2007-05-08 23:36:25 UTC
Created attachment 20520 [details]
Fix for this bug

A variable was not initialized in MessageWidgetController, causing the canvas
to be resized to a random value, and eating all memory.
Comment 3 Oliver Kellogg 2007-05-09 20:22:09 UTC
SVN commit 662970 by okellogg:

Constructor: Initialize m_unconstrainedPositionY.
Thanks to Tonton for the fix (attachment 20520 [details].)
BUG:145202


 M  +1 -0      ChangeLog  
 M  +1 -0      THANKS  
 M  +1 -0      umbrello/messagewidgetcontroller.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #662969:662970
@@ -36,6 +36,7 @@
 * Crash when loading xmi with actor as object of sequence diagram (144442)
 * ActionScript/JavaScript association code generation error (144788)
 * Segmentation fault on loading corrupted file (145035)
+* Crash when moving all elements in a sequence diagram (145202)
 
 Version 1.5.61
 
--- branches/KDE/3.5/kdesdk/umbrello/THANKS #662969:662970
@@ -77,6 +77,7 @@
 Sebastian Stein <seb.stein @gmx.de>
 Andrew Sutton <asutton @cs.kent.edu>
 Tanuj <tagrawal @hss.hns.com>
+Tonton <tonton-lists @team1664.org>
 Brian Thomas <brian.thomas @gsfc.nasa.gov>
 Ferenc Veres <lion @netngine.hu>
 Jean Vittor <jean.vittor @wanadoo.fr>
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/messagewidgetcontroller.cpp #662969:662970
@@ -25,6 +25,7 @@
 MessageWidgetController::MessageWidgetController(MessageWidget* messageWidget):
             UMLWidgetController(messageWidget) {
     m_messageWidget = messageWidget;
+    m_unconstrainedPositionY = 0;
 }
 
 MessageWidgetController::~MessageWidgetController() {