[umbrello-devel] [umbrello] [Bug 339278] Crash when resizing class diagram display

Oliver Kellogg okellogg at users.sourceforge.net
Mon Sep 22 22:34:26 UTC 2014


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

--- Comment #3 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 4ee55eae306b4a1169f7d8e5e7af20a14a74e64a by Oliver Kellogg.
Committed on 22/09/2014 at 22:36.
Pushed by okellogg into branch 'master'.

Address http://bugs.kde.org/attachment.cgi?id=88780

(In reply to Mark Stanton from comment #0)
> [...] The display doesn't resize and the app crashes.
> I may have tried this before the project had fully loaded. [...]

The backtrace confirms this, apparently you double clicked on a class widget
on a diagram while Umbrello was still busy in UMLDoc::resolveTypes().
By the way, Umbrello is finished loading when you see "Ready." in the lower
left corner of Umbrello's main window.

The following changes fend off double clicks on diagram objects while the
program is still busy in loadFromXMI() or resolveTypes():

umbrello/umldoc.cpp
- In default constructor, initialize m_bTypesAreResolved to true.
- In function closeDocument() remove assignment to m_bTypesAreResolved.
- In function openDocument(),
  - Add a few missing KIO::NetAccess::removeTempFile() calls in return-on-
    error situations;
  - Set m_bTypesAreResolved false before loadFromXMI()/loadFromMDL() calls;
  - Set m_bLoading false and m_bTypesAreResolved true before returning.
- In function loading() return true also when m_bTypesAreResolved is false.
- In function resolveTypes() postpone setting of m_bTypesAreResolved to true
  until type resolution has actually completed.

umbrello/umlscene.cpp
- In function mousePressEvent() call m_pToolBarState->mouseDoubleClick()
  only if m_doc->loading() returns false.

M  +18   -18   umbrello/umldoc.cpp
M  +2    -1    umbrello/umlscene.cpp

http://commits.kde.org/umbrello/4ee55eae306b4a1169f7d8e5e7af20a14a74e64a

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


More information about the umbrello-devel mailing list