Bug 345546 - stereotype reference count issue on close, open or new document
Summary: stereotype reference count issue on close, open or new document
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.10.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks: 73847
  Show dependency treegraph
 
Reported: 2015-03-26 12:53 UTC by Ralf Habacker
Modified: 2016-10-27 12:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.17.2 (KDE Applications 15.08.2)
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2015-03-26 12:53:15 UTC
On closing documents stereotyps are not unreferenced.



Reproducible: Always

Steps to Reproduce:
1. compile umbrello from git source
2. set a breakpoint on the last instruction in UMLDoc::closeDocument()
3. start umbrello debug session
-> the debugger will break the application
4. inspect this->m_stereolist
-> there is one entry: 
    folder with m_refcount=6
5. click menu entry file->close  to close the document
-> the debugger will break the application
6. inspect this->m_stereolist
-> there are two entries: 
    folder with m_refcount=6
    datatypes with m_refcount=11
7. continue again click menu entry file->close  to close the document
-> the debugger will break the application
8. inspect this->m_stereolist
-> there are two entries: 
    folder with m_refcount=6
    datatypes with m_refcount=22
and so one


Actual Results:  
The 'datatype' stereotype is not dereferenced on document close. Every iteration of close/new/open documents only increase the reference counter.

Expected Results:  
The 'datatype' stereotype should be dereferenced on document close.


bug is present at least since version 2.9.
Comment 1 Ralf Habacker 2015-03-27 12:02:45 UTC
Git commit cdf610dfb9df899079aeb76d7d13c09227374e9a by Ralf Habacker.
Committed on 26/03/2015 at 13:21.
Pushed by habacker into branch 'work/73847-uml-tagged-value'.

Fix 'Stereotype reference count issue on close, open or new document'.

M  +12   -0    umbrello/umldoc.cpp
M  +1    -0    umbrello/umldoc.h
M  +2    -2    umbrello/umlobject.cpp

http://commits.kde.org/umbrello/cdf610dfb9df899079aeb76d7d13c09227374e9a
Comment 2 Ralf Habacker 2015-10-05 04:46:51 UTC
Git commit c8821ea04bb2317bdba66a444612981c45047ea0 by Ralf Habacker.
Committed on 05/10/2015 at 04:17.
Pushed by habacker into branch 'work/73847-uml-tagged-value'.

Fix 'Stereotype reference count issue on close, open or new document'.

M  +12   -0    umbrello/umldoc.cpp
M  +1    -0    umbrello/umldoc.h
M  +2    -2    umbrello/umlmodel/umlobject.cpp

http://commits.kde.org/umbrello/c8821ea04bb2317bdba66a444612981c45047ea0
Comment 3 Ralf Habacker 2015-10-07 12:28:49 UTC
Git commit c55cebc95fc0954fd48510fd20c1bbe3e05e07dc by Ralf Habacker.
Committed on 07/10/2015 at 12:28.
Pushed by habacker into branch 'Applications/15.08'.

Fix 'Stereotype reference count issue on close, open or new document'.

We also need to avoid dangled stereotype pointer by using
a QPointer instance for UMLObject::m_stereotype.

FIXED-IN:2.17.2 (KDE Applications 15.08.2)

M  +4    -5    umbrello/umldoc.cpp
M  +1    -1    umbrello/umlobject.h

http://commits.kde.org/umbrello/c55cebc95fc0954fd48510fd20c1bbe3e05e07dc
Comment 4 Ralf Habacker 2015-10-07 14:45:42 UTC
Git commit 3b16b05cb74428b1e8a2bec42ec6f327c65ba0dc by Ralf Habacker.
Committed on 07/10/2015 at 14:13.
Pushed by habacker into branch 'Applications/15.08'.

Fix incomplete UMLStereotype reference counting.

M  +1    -0    umbrello/stereotype.cpp
M  +15   -0    umbrello/umlobject.cpp

http://commits.kde.org/umbrello/3b16b05cb74428b1e8a2bec42ec6f327c65ba0dc
Comment 5 Ralf Habacker 2015-10-07 14:45:43 UTC
Git commit cba7534e88ce8652dd8ce9ac4252cf23a51e9cd2 by Ralf Habacker.
Committed on 07/10/2015 at 14:44.
Pushed by habacker into branch 'Applications/15.08'.

Add dock window for stereotypes using a QTableView.

We need this for inspecting stereotypes.

M  +2    -0    umbrello/CMakeLists.txt
A  +124  -0    umbrello/stereotypesmodel.cpp     [License: GPL (v2+)]
A  +47   -0    umbrello/stereotypesmodel.h     [License: GPL (v2+)]
A  +75   -0    umbrello/stereotypeswindow.cpp     [License: GPL (v2+)]
A  +38   -0    umbrello/stereotypeswindow.h     [License: GPL (v2+)]
M  +1    -0    umbrello/umbrelloui.rc
M  +2    -0    umbrello/uml.cpp
M  +19   -2    umbrello/umlappprivate.h
M  +16   -8    umbrello/umldoc.cpp
M  +5    -0    umbrello/umldoc.h

http://commits.kde.org/umbrello/cba7534e88ce8652dd8ce9ac4252cf23a51e9cd2
Comment 6 Ralf Habacker 2015-10-07 14:48:55 UTC
Git commit 01a11118f78d2cd66e9b78ded07b6f4cf1c47fd1 by Ralf Habacker.
Committed on 07/10/2015 at 14:48.
Pushed by habacker into branch 'Applications/15.08'.

Do not add i18n calls in stable branches.

M  +2    -1    umbrello/umlappprivate.h

http://commits.kde.org/umbrello/01a11118f78d2cd66e9b78ded07b6f4cf1c47fd1
Comment 7 Ralf Habacker 2015-10-07 16:37:07 UTC
Git commit 36eb4d747445fdf95c358e505f1442ffbf27ced3 by Ralf Habacker.
Committed on 07/10/2015 at 16:36.
Pushed by habacker into branch 'Applications/15.08'.

Recreate datatype folder on document close after deleting stereotypes.

Unfortunally there are still referenced stereotypes, so no not assert
in UMLStereotype destructor.

M  +1    -1    umbrello/stereotype.cpp
M  +5    -5    umbrello/umldoc.cpp

http://commits.kde.org/umbrello/36eb4d747445fdf95c358e505f1442ffbf27ced3
Comment 8 Ralf Habacker 2015-10-07 17:32:10 UTC
Git commit b4d7fc64444d6b9c17abea150fc0f7929dd10965 by Ralf Habacker.
Committed on 07/10/2015 at 17:31.
Pushed by habacker into branch 'master'.

Enable i18n calls in stereotype dock widget for coming umbrello 2.18 branch.

M  +2    -5    umbrello/stereotypesmodel.cpp
M  +1    -4    umbrello/stereotypeswindow.cpp
M  +1    -2    umbrello/umlappprivate.h

http://commits.kde.org/umbrello/b4d7fc64444d6b9c17abea150fc0f7929dd10965
Comment 9 Ralf Habacker 2015-12-16 18:48:37 UTC
Git commit dc57c8654416520ea6e0bceb343298a7d226e010 by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Recreate datatype folder on document close after deleting stereotypes.

Unfortunally there are still referenced stereotypes, so no not assert
in UMLStereotype destructor.

M  +5    -5    umbrello/umldoc.cpp
M  +1    -1    umbrello/umlmodel/stereotype.cpp

http://commits.kde.org/umbrello/dc57c8654416520ea6e0bceb343298a7d226e010
Comment 10 Ralf Habacker 2015-12-16 18:49:18 UTC
Git commit 5916702305d5e39c805527edfba198a66ca33584 by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Fix 'Stereotype reference count issue on close, open or new document'.

We also need to avoid dangled stereotype pointer by using
a QPointer instance for UMLObject::m_stereotype.

FIXED-IN:2.17.2 (KDE Applications 15.08.2)

M  +4    -5    umbrello/umldoc.cpp
M  +1    -1    umbrello/umlmodel/umlobject.h

http://commits.kde.org/umbrello/5916702305d5e39c805527edfba198a66ca33584
Comment 11 Ralf Habacker 2015-12-16 18:50:12 UTC
Git commit 00ffd3b58f94a6d712b1a756613608080d2aaf94 by Ralf Habacker.
Committed on 16/12/2015 at 18:15.
Pushed by habacker into branch 'frameworks'.

Fix incomplete UMLStereotype reference counting.

M  +1    -0    umbrello/umlmodel/stereotype.cpp
M  +15   -0    umbrello/umlmodel/umlobject.cpp

http://commits.kde.org/umbrello/00ffd3b58f94a6d712b1a756613608080d2aaf94
Comment 12 Lays Rodrigues 2016-10-27 12:06:35 UTC
Git commit 9db02d21f1df3f3b515cecc9eae02e4b6ec22fc1 by Lays Rodrigues, on behalf of Ralf Habacker.
Committed on 27/10/2016 at 11:44.
Pushed by laysrodrigues into branch 'frameworks'.

Fix incomplete UMLStereotype reference counting.

M  +1    -1    umbrello/umlmodel/stereotype.cpp
M  +2    -4    umbrello/umlmodel/umlobject.cpp

http://commits.kde.org/umbrello/9db02d21f1df3f3b515cecc9eae02e4b6ec22fc1
Comment 13 Lays Rodrigues 2016-10-27 12:07:26 UTC
Git commit 1d6f9357da19ed235fe2c9690f00a28e3e03dc00 by Lays Rodrigues, on behalf of Ralf Habacker.
Committed on 27/10/2016 at 11:44.
Pushed by laysrodrigues into branch 'frameworks'.

Recreate datatype folder on document close after deleting stereotypes.

Unfortunally there are still referenced stereotypes, so no not assert
in UMLStereotype destructor.

M  +1    -10   umbrello/umldoc.cpp
M  +1    -1    umbrello/umlmodel/stereotype.cpp

http://commits.kde.org/umbrello/1d6f9357da19ed235fe2c9690f00a28e3e03dc00
Comment 14 Lays Rodrigues 2016-10-27 12:08:17 UTC
Git commit c307d08336d2e02f43a90947f2532f491226ee1d by Lays Rodrigues, on behalf of Ralf Habacker.
Committed on 27/10/2016 at 11:44.
Pushed by laysrodrigues into branch 'frameworks'.

Fix 'Stereotype reference count issue on close, open or new document'.

We also need to avoid dangled stereotype pointer by using
a QPointer instance for UMLObject::m_stereotype.

FIXED-IN:2.17.2 (KDE Applications 15.08.2)

M  +6    -0    umbrello/umldoc.cpp

http://commits.kde.org/umbrello/c307d08336d2e02f43a90947f2532f491226ee1d