SMTK issueshttps://gitlab.kitware.com/cmb/smtk/-/issues2021-06-11T16:05:35-04:00https://gitlab.kitware.com/cmb/smtk/-/issues/426ReferenceItem not loading correctly from .smtk file2021-06-11T16:05:35-04:00John TourtellottReferenceItem not loading correctly from .smtk fileFor attributes defined with an extensible number of associations and required number of 1, it appears that when loaded from a resource (.smtk) file, an empty value is getting created such that the attribute is reported itself as valid wh...For attributes defined with an extensible number of associations and required number of 1, it appears that when loaded from a resource (.smtk) file, an empty value is getting created such that the attribute is reported itself as valid when nothing has been assigned.
There is an archive file `cmb1.tgz` in folder https://data.kitware.com/#user/55dcb06e8d777f6ddc3ff892/folder/5e383b28af2e2eed356037f8 that can be used to reproduce the error. It is an smtk project, however you can reproduce the error just by loading the attribute resource directly. A python script to show the error is attached here.
[testcmb2.py](/uploads/01f60fac8a77c2c9a5d43df30824ed23/testcmb2.py)Ryan Krattigerryan.krattiger@kitware.comRyan Krattigerryan.krattiger@kitware.comhttps://gitlab.kitware.com/cmb/smtk/-/issues/425Creating or reading in multiple attribute resources causes a race condition2021-06-08T14:12:28-04:00chart3388Creating or reading in multiple attribute resources causes a race conditionThe race condition occurs because the attribute panel occurs because it gets told to display a new attribute resource while it is still working on displays the previous resource.
Displaying a new attribute resource involves deleting all ...The race condition occurs because the attribute panel occurs because it gets told to display a new attribute resource while it is still working on displays the previous resource.
Displaying a new attribute resource involves deleting all the widgets of the previous attribute resource (if there is a previous attribute resource)
https://gitlab.kitware.com/cmb/smtk/blob/master/smtk/extension/paraview/appcomponents/pqSMTKAttributePanel.cxx#L54
FYI: @bob.obara @dcthomphttps://gitlab.kitware.com/cmb/smtk/-/issues/423Create SMTK 21.052021-06-04T11:30:32-04:00Robert M. O'BaraCreate SMTK 21.05<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the ...<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the release sequence number (start at 0)
- `BRANCHPOINT`: The commit where the release should be started
Please remove this comment.
-->
# Preparatory steps
- Update smtk guides
- Assemble release notes into `doc/release/notes/smtk-21.05.md`.
- [ ] If `PATCH` is greater than 0, add items to the end of this file.
- [ ] Get positive review and merge.
# Update smtk
Keep the relevant items for the kind of release this is.
If making a first release candidate from master, i.e., `PATCH` is 0.
- [x] Update `master` branch for **smtk**
```
git fetch origin
git checkout master
git merge --ff-only origin/master
```
- [x] Update `version.txt` and tag the commit
```
git checkout -b update-to-v21.05.0 057a6bfba5fdf5bb7fc51206bfc1b4853a6c5552
echo 21.05.0 > version.txt
git commit -m 'Update version number to 21.05.0' version.txt
git tag -a -m 'SMTK 21.05.0' v21.05.0 HEAD
```
- Integrate changes.
- Make a commit for each of these `release`-only changes
- [x] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash groups
- Create a merge request targeting `release`
- [x] Obtain a GitLab API token for the `kwrobot.release.cmb` user (ask @ben.boeckel if you do not have one)
- [x] Add the `kwrobot.release.cmb` user to your fork with at least `Developer` privileges (so it can open MRs)
- [x] Use [the `release-mr`][release-mr] script to open the create the Merge Request (see script for usage)
- Pull the script for each release; it may have been updated since it was last used
- [x] Get positive review
- [x] `Do: merge`
- [x] Push the tag to the main repository
- [x] `git push origin v21.05.0`
- Software process updates (these can all be done independently)
- [x] Update kwrobot with the new `release` branch rules (@ben.boeckel)
- [x] Run [this script][cdash-update-groups] to update the CDash groups
- This must be done after a nightly run to ensure all builds are in the `release` group
- See the script itself for usage documentation
- [ ] Add (or update if `PATCH` is greater than 0) version selection entry in cmb-superbuild
[release-mr]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/release-mr.py
[cdash-update-groups]: https://gitlab.kitware.com/utils/cdash-utils/-/blob/master/cdash-update-groups.py
# Post-release
- [x] Write and publish blog post with release notes.
- [x] Post an announcement in the Announcements category on
[discourse.smtk.org](https://discourse.kitware.com/c/smtk/).
- [x] Remove deprecated methods on `master`
/cc @ben.boeckel
/cc @bob.obara
/cc @dcthompRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/420Creating SMTK 21.04 Release using New Process2021-05-25T10:16:53-04:00Robert M. O'BaraCreating SMTK 21.04 Release using New Process<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the ...<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the release sequence number (start at 0)
Please remove this comment.
-->
# Preparatory steps
- Update smtk guides
- Assemble release notes into `doc/release/notes/smtk-MAJOR.MINOR.md`.
- [ ] If `PATCH` is greater than 0, add items to the end of this file.
- [ ] Get positive review and merge.
# Update smtk
Keep the relevant items for the kind of release this is.
If making a first release candidate from master, i.e., `PATCH` is 0.
- [x] Update `master` branch for **smtk**
```
git fetch origin
git checkout master
git merge --ff-only origin/master
```
- [x] Update `version.txt` and tag the commit
```
git checkout -b update-to-v21.04.0 cbaf3b2f7beb38529b9941f70eb36c338357cde2
echo 21.04.0 > version.txt
git commit -m 'Update version number to 21.04.0' version.txt
git tag -a -m 'SMTK 21.04.0' v21.04.0 HEAD
```
- Integrate changes.
- [x] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash groups and commit it
- Create a merge request targeting `release`
- [x] Obtain a GitLab API token for the `kwrobot.release.cmb` user (ask @ben.boeckel if you do not have one)
- [x] Add the `kwrobot.release.cmb` user to your fork with at least `Developer` privileges (so it can open MRs)
- [x] Use [the `release-mr`][release-mr] script to open the create the Merge Request (see script for usage)
- [x] Get positive review
- [x] `Do: merge`
- [x] Push the tag to the main repository
- [x] `git push origin v21.04.0`
- Software process updates (these can all be done independently)
- [x] Update kwrobot with the new `release` branch rules (@ben.boeckel)
- [x] Run [this script][cdash-update-groups] to update the CDash groups
- This must be done after a nightly run to ensure all builds are in the `release` group
- See the script itself for usage documentation
- [ ] Add (or update if `PATCH` is greater than 0) version selection entry in cmb-superbuild
[release-mr]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/release-mr.py
[cdash-update-groups]: https://gitlab.kitware.com/utils/cdash-utils/-/blob/master/cdash-update-groups.py
# Post-release
- [x] Write and publish blog post with release notes.
- [x] Post an announcement in the Announcements category on
[discourse.smtk.org](https://discourse.kitware.com/c/smtk/).
- [x] Remove deprecated methods on `master`
/cc @ben.boeckel
/cc @bob.obara
/cc @dcthompRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/419Create SMTK 21.04 Release2021-04-15T10:40:58-04:00Robert M. O'BaraCreate SMTK 21.04 Release<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the ...<!--
This template is for tracking a release of smtk. Please replace the
following strings with the associated values:
- `VERSION`: e.g. yy.mm.n
- `MAJOR`: e.g. yy is the year
- `MINOR`: e.g. mm is the month
- `PATCH`: e.g. the release sequence number (start at 0)
Please remove this comment.
-->
# Preparatory steps
- Update smtk guides
- Assemble release notes into `doc/release/notes/smtk-21.04.md`.
- [x] If `PATCH` is greater than 0, add items to the end of this file.
- [x] Get positive review and merge.
# Update smtk
Keep the relevant items for the kind of release this is.
If making a first release candidate from master, i.e., `PATCH` is 0.
- [x] Update `master` branch for **smtk**
```
git fetch origin
git checkout master
git merge --ff-only origin/master
```
- [x] Update `version.txt` and tag the commit
```
git checkout -b update-to-v21.04.0
echo 21.04.0 > version.txt
git commit -m 'Update version number to 21.04.0' version.txt
git tag -a -m 'SMTK 21.04.0' v21.04.0 HEAD
```
- Integrate changes to `master` branch
- [x] Create a merge request targeting `master` (do *not* add `Backport: release`)
- [ ] Get positive review
- [ ] `Do: merge`
- Integrate changes to `release` branch
- [ ] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash groups and commit it
- [ ] `git push origin update-to-v21.04.0:release v21.04.0 `
<!--
Once the robot supports fast-forward merges, this section replaces the above
`Integrate changes` sections:
- Integrate changes.
- [ ] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash groups and commit it
- [ ] Create a merge request targeting `release`
- [ ] Add `Backport: master:HEAD~` to end of the MR description
- [ ] Add `Fast-forward: true` to end of the MR description
- [ ] Get positive review
- [ ] `Do: merge`
-->
- Software process updates (these can all be done independently)
- [ ] Update kwrobot with the new `release` branch rules (@ben.boeckel)
- [ ] Run [this script][cdash-update-groups] to update the CDash groups (must be done after a nightly run to ensure all builds are in the `release` group).
- [ ] Add (or update if `PATCH` is greater than 0) version selection entry in cmb-superbuild
[cdash-update-groups]: https://gitlab.kitware.com/utils/cdash-utils/-/blob/master/cdash-update-groups.py
# Post-release
- [ ] Write and publish blog post with release notes.
- [ ] Post an announcement in the Announcements category on
[discourse.smtk.org](https://discourse.kitware.com/c/smtk/).
- [ ] Remove deprecated methods on `master`
/cc @ben.boeckel
/cc @bob.obara
/cc @dcthompRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/418SMTK ghostflow should look for restructured-text release notes2021-04-14T10:04:18-04:00David ThompsonSMTK ghostflow should look for restructured-text release notesPlease modify the ghostflow configuration for cmb/smtk> MRs to look for `.rst` files in `doc/release/notes` instead of `.md` files. If you want to test, see !2415 which has an RST note.Please modify the ghostflow configuration for cmb/smtk> MRs to look for `.rst` files in `doc/release/notes` instead of `.md` files. If you want to test, see !2415 which has an RST note.Brad KingBrad Kinghttps://gitlab.kitware.com/cmb/smtk/-/issues/415Attribute resource is not displaying it's invalid state correctly when a comp...2021-03-31T10:12:31-04:00chart3388Attribute resource is not displaying it's invalid state correctly when a component item is deletedAttribute resource is not displaying it's invalid state correctly when a component item is deleted. Attached is the SBT for this bug. [ComponentItemUpdates.sbt](/uploads/17847098ac929960d3b64816ca0d511e/ComponentItemUpdates.sbt)
1. Cr...Attribute resource is not displaying it's invalid state correctly when a component item is deleted. Attached is the SBT for this bug. [ComponentItemUpdates.sbt](/uploads/17847098ac929960d3b64816ca0d511e/ComponentItemUpdates.sbt)
1. Create an Attribute Instance in View 1
1. Create an Attribute Instance in View 2
1. Select the Attribute you created in View 1 in the View 2 attributes component item
1. Delete the attribute you created in View 1.
![image](/uploads/cdfe733d00e2b0ed92da76c99b0bf97b/image.png)
FYI: @bob.obara @dcthomp @am300edRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/414Serialization persists the visibility state of items in a PhraseModel2021-04-16T17:00:14-04:00chart3388Serialization persists the visibility state of items in a PhraseModelSaving all resources after toggling the visibility on items in a phrase model persists that state to the next time the resources are opened. Visibility is per pqView and visibility is stored in a global map according. This is why resour...Saving all resources after toggling the visibility on items in a phrase model persists that state to the next time the resources are opened. Visibility is per pqView and visibility is stored in a global map according. This is why resources with the same UUID persist their visibility after the resources are closed and then reopened in the same pqView.
FYI: @bob.obara @dcthompchart3388chart3388https://gitlab.kitware.com/cmb/smtk/-/issues/413not enough space is being given to a GroupItem and expanded item below it2021-06-30T14:55:24-04:00chart3388not enough space is being given to a GroupItem and expanded item below itFrom the attached screenshot you can the item blow the group item is shifted outside of its area causing a negative user experience. You will notice in the GroupItems which are not enabled part of their lettering is cut off as well. At...From the attached screenshot you can the item blow the group item is shifted outside of its area causing a negative user experience. You will notice in the GroupItems which are not enabled part of their lettering is cut off as well. Attached is an SBT.[GroupItemBug.sbt](/uploads/8901063565a54b8056cfcf811bea8984/GroupItemBug.sbt)
![image](/uploads/50294f0df4f95fbcf0960fff06ae84c0/image.png)
FYI: @bob.obara @am300ed @dcthompRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/412Double Analysis Bug - Two on first click and crash on delete2021-06-16T12:30:33-04:00chart3388Double Analysis Bug - Two on first click and crash on deleteWhen creating the first Analysis we are getting two returned. I verified this does not happen in 6.3.0-rc1 but does happen in the nightly builds.
- Subsequent additions only result in adding a single Analysis.
- If you remove both of ...When creating the first Analysis we are getting two returned. I verified this does not happen in 6.3.0-rc1 but does happen in the nightly builds.
- Subsequent additions only result in adding a single Analysis.
- If you remove both of the original duplicate Analysis you will generate a segfault.
- If you create the first Analysis and change "Show Level:" Option from General to Advanced, the extra Analysis goes away and deleting the remaining Analysis does not crash.
Attached is the SBT to reproduce. [DoubleAnalysesBug.sbt](/uploads/674c649d989d1f276f2e67fddc8a0314/DoubleAnalysesBug.sbt)
![image](/uploads/9608c7ab8a3460d5729b6037f24a871d/image.png)
```
Loguru caught a signal: SIGABRT
Stack trace:
50 0x4116c9 /opt/cmb-6.99.0/bin/modelbuilder() [0x4116c9]
49 0x7fb92ce23830 __libc_start_main + 240
48 0x41f5db /opt/cmb-6.99.0/bin/modelbuilder() [0x41f5db]
47 0x7fb936399660 QCoreApplication::exec() + 128
46 0x7fb936390c1a QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 234
45 0x7fb9363e976f QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 95
44 0x7fb92491949c g_main_context_iteration + 44
43 0x7fb9249193f0 /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7fb9249193f0]
42 0x7fb924919197 g_main_context_dispatch + 679
41 0x7fb8fb144f3a /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5XcbQpa.so.5(+0x6bf3a) [0x7fb8fb144f3a]
40 0x7fb9369ec05b QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 203
39 0x7fb936a0ea95 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 261
38 0x7fb936a0d54a QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 1594
37 0x7fb936392358 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 264
36 0x7fb93726eb10 QApplication::notify(QObject*, QEvent*) + 688
35 0x7fb93726792c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
34 0x7fb9372c1d33 /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Widgets.so.5(+0x1bad33) [0x7fb9372c1d33]
33 0x7fb9372bf071 /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Widgets.so.5(+0x1b8071) [0x7fb9372bf071]
32 0x7fb93726e02a QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 506
31 0x7fb936392358 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 264
30 0x7fb93726f7ff QApplication::notify(QObject*, QEvent*) + 3999
29 0x7fb93726792c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
28 0x7fb93742f7e9 QToolButton::event(QEvent*) + 105
27 0x7fb9372a5790 QWidget::event(QEvent*) + 496
26 0x7fb93742f71a QToolButton::mouseReleaseEvent(QMouseEvent*) + 10
25 0x7fb937350925 QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 213
24 0x7fb937350810 /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Widgets.so.5(+0x249810) [0x7fb937350810]
23 0x7fb937263d70 QAction::activate(QAction::ActionEvent) + 272
22 0x7fb937261952 QAction::triggered(bool) + 50
21 0x7fb9363be176 QMetaObject::activate(QObject*, int, int, void**) + 2486
20 0x7fb8e4ea0aef /opt/cmb-6.99.0/bin/../lib/smtk-3.3.0/smtkQtPlugin/../../libsmtkQtExt.so(+0x2feaef) [0x7fb8e4ea0aef]
19 0x7fb8e4ea18cc /opt/cmb-6.99.0/bin/../lib/smtk-3.3.0/smtkQtPlugin/../../libsmtkQtExt.so(+0x2ff8cc) [0x7fb8e4ea18cc]
18 0x7fb8e4ea1f54 /opt/cmb-6.99.0/bin/../lib/smtk-3.3.0/smtkQtPlugin/../../libsmtkQtExt.so(+0x2fff54) [0x7fb8e4ea1f54]
17 0x7fb8e4e956af smtk::extension::qtAttributeView::onDeleteSelected() + 59
16 0x7fb8e4e937de smtk::extension::qtAttributeView::getSelectedAttribute() + 86
15 0x7fb8e4e93653 smtk::extension::qtAttributeView::getAttributeFromIndex(QModelIndex const&) + 199
14 0x7fb8e4e73542 smtk::attribute::Attribute::shared_from_this() + 50
13 0x7fb8e4e733f6 smtk::resource::Component::shared_from_this() + 54
12 0x7fb8e4e743c3 std::enable_shared_from_this<smtk::resource::PersistentObject>::shared_from_this() + 35
11 0x7fb8e4e75053 std::shared_ptr<smtk::resource::PersistentObject>::shared_ptr<smtk::resource::PersistentObject>(std::weak_ptr<smtk::resource::PersistentObject> const&) + 35
10 0x7fb8e4e75fe3 std::__shared_ptr<smtk::resource::PersistentObject, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<smtk::resource::PersistentObject>(std::__weak_ptr<smtk::resource::PersistentObject, (__gnu_cxx::_Lock_policy)2> const&) + 43
9 0x7fb8e52bb07d std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__weak_count<(__gnu_cxx::_Lock_policy)2> const&) + 57
8 0x7fb8e52b9a10 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_lock() + 54
7 0x7fb8e52b99da std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_lock() + 0
6 0x7fb92d779919 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d919) [0x7fb92d779919]
5 0x7fb92d779701 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d701) [0x7fb92d779701]
4 0x7fb92d7796b6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d6b6) [0x7fb92d7796b6]
3 0x7fb92d77b84d __gnu_cxx::__verbose_terminate_handler() + 365
2 0x7fb92ce3a02a abort + 362
1 0x7fb92ce38428 gsignal + 56
0 0x7fb92da7f390 /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fb92da7f390]
( 233.264s) [paraview ] :0 FATL| Signal: SIGABRT
```
FYI: @bob.obara @am300ed @dcthompRobert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/410Operation dialog parameter value ignored on Enter2021-03-28T08:20:40-04:00Aron HelserOperation dialog parameter value ignored on EnterIf I create an operation dialog, and change one of the operation parameters, then execute, by:
* typing in a value
* hitting "Enter"
the value I entered is ignore, and the default value is used. If instead I:
* type a value and hit "Tab"...If I create an operation dialog, and change one of the operation parameters, then execute, by:
* typing in a value
* hitting "Enter"
the value I entered is ignore, and the default value is used. If instead I:
* type a value and hit "Tab"
* type a value and click the "Apply" button
the new value is used.John TourtellottJohn Tourtellotthttps://gitlab.kitware.com/cmb/smtk/-/issues/408Added the ability for ReferenceItems to have optional children2021-03-02T09:56:37-05:00Robert M. O'BaraAdded the ability for ReferenceItems to have optional childrenSimilar to ValueItems it should be possible to have ReferenceItem to have additional children items based on the object being assigned to it.
In this case it should be based on a conditional composed of both a resource and component que...Similar to ValueItems it should be possible to have ReferenceItem to have additional children items based on the object being assigned to it.
In this case it should be based on a conditional composed of both a resource and component query. See [this discourse topic](https://discourse.kitware.com/t/extending-referenceitem/605/3) for more details.Robert M. O'BaraRobert M. O'Barahttps://gitlab.kitware.com/cmb/smtk/-/issues/407Removing links is nondeterministic2021-03-03T11:49:58-05:00chart3388Removing links is nondeterministicCreated two attribute::Resources. attributeResource1 contains att1 and att2. attributeResource2 contains att3. Now, we add two links:
att3 -> att1
att3 -> att2
This line returns false about half the time:
```cpp
EXPECT_TRUE(att3->links...Created two attribute::Resources. attributeResource1 contains att1 and att2. attributeResource2 contains att3. Now, we add two links:
att3 -> att1
att3 -> att2
This line returns false about half the time:
```cpp
EXPECT_TRUE(att3->links().removeLinksTo(att1POAsAtt, 27));
```
Creating only a link from att3 to att1 causes the test to pass every time.
```cpp
#include <gtest/gtest.h>
#include <smtk/attribute/Attribute.h>
#include <smtk/attribute/Definition.h>
#include <smtk/attribute/Resource.h>
#include <smtk/resource/Links.h>
#include <smtk/resource/PersistentObject.h>
TEST(LinksTest, TwoLinksToOneComponent)
{
smtk::attribute::Resource::Ptr attributeResource1 =
smtk::attribute::Resource::create();
smtk::attribute::Resource::Ptr attributeResource2 =
smtk::attribute::Resource::create();
attributeResource1->createDefinition("def");
smtk::attribute::AttributePtr att1 =
attributeResource1->createAttribute("def");
smtk::attribute::AttributePtr att2 =
attributeResource1->createAttribute("def");
attributeResource2->createDefinition("def");
smtk::attribute::AttributePtr att3 =
attributeResource2->createAttribute("def");
smtk::resource::Links::Key key3To1 = att3->links().addLinkTo(att1, 27);
smtk::resource::Links::Key key3To2 = att3->links().addLinkTo(att2, 27);
smtk::resource::PersistentObjectPtr att1PO = att3->links().linkedObject(key3To1);
ASSERT_TRUE(att1PO);
EXPECT_EQ(att1PO, att1);
smtk::attribute::AttributePtr att1POAsAtt = att1PO->as<smtk::attribute::Attribute>();
ASSERT_TRUE(att1POAsAtt);
EXPECT_TRUE(att3->links().removeLinksTo(att1POAsAtt, 27));
smtk::resource::PersistentObjectPtr att2PO = att3->links().linkedObject(key3To2);
ASSERT_TRUE(att2PO);
EXPECT_EQ(att2PO, att2);
smtk::attribute::AttributePtr att2POAsAtt = att2PO->as<smtk::attribute::Attribute>();
ASSERT_TRUE(att2POAsAtt);
EXPECT_TRUE(att3->links().removeLinksTo(att2POAsAtt, 27));
}
```https://gitlab.kitware.com/cmb/smtk/-/issues/406Links::linkedTo() can return nullptrs if linked Components cannot be found in...2021-03-03T12:00:34-05:00chart3388Links::linkedTo() can return nullptrs if linked Components cannot be found in their Resource1. Imagine we have Resource "x" with Component "a" and Resource "y" with Component "b".
1. Link Component "a" to Component "b".
1. Remove Component "b" from Resource "y".
1. Call a->linkedTo(). The returned set will contain a nullptr.
W...1. Imagine we have Resource "x" with Component "a" and Resource "y" with Component "b".
1. Link Component "a" to Component "b".
1. Remove Component "b" from Resource "y".
1. Call a->linkedTo(). The returned set will contain a nullptr.
What happened? Links is calling Resource::find(ComponentPtr) and it is not checking that find() returns a non-null ComponentPtr.
This means that the burden is on the client of linkedTo() check each element of the returned PersistentObjectSet.https://gitlab.kitware.com/cmb/smtk/-/issues/405Current modelbuilder locks up trying to close resource2021-02-22T12:55:30-05:00John TourtellottCurrent modelbuilder locks up trying to close resourceIt appears that some mutex deadlock is occurring with the latest master-branch builds. To replicate with nightly download (I used linux package at https://data.kitware.com/#collection/58fa68228d777f16d01e03e5/folder/6031f20a2fa25629b9953...It appears that some mutex deadlock is occurring with the latest master-branch builds. To replicate with nightly download (I used linux package at https://data.kitware.com/#collection/58fa68228d777f16d01e03e5/folder/6031f20a2fa25629b9953fdb):
* Use File => Open to load a model file, e.g., smtk/data/model/3d/gen/casting-mesh2.gen. (Problem can also be duplicated opening an attribute template.)
* After model is loaded, use File => Close Resource. In the popup warning window, click on "Close without saving".
* After the popup closes, the modelbuilder is locked up and you have to control-c or otherwise kill the process.https://gitlab.kitware.com/cmb/smtk/-/issues/404VTKSelectionResponder::resourceForOperation is limiting2021-04-16T17:00:11-04:00David ThompsonVTKSelectionResponder::resourceForOperation is limitingIt should probably be VTKSelectionResponder::resourcesForOperation (plural) to accommodate the same operation for multiple resources.
cc: @chart3388It should probably be VTKSelectionResponder::resourcesForOperation (plural) to accommodate the same operation for multiple resources.
cc: @chart3388David ThompsonDavid Thompson2021-02-24https://gitlab.kitware.com/cmb/smtk/-/issues/403Calling smtk::graph::Resource::arcs() with non-const return type results Seg2021-04-23T10:12:28-04:00chart3388Calling smtk::graph::Resource::arcs() with non-const return type results SegCalling `smtk::graph::Resource::arcs()` with non-const return type results in an attempted double free in `smtk::common::TypeMapBase<>::~TypeMapBase()`. If you use `const auto& myArcs = graph->arcs()` you can get around this for now.
...Calling `smtk::graph::Resource::arcs()` with non-const return type results in an attempted double free in `smtk::common::TypeMapBase<>::~TypeMapBase()`. If you use `const auto& myArcs = graph->arcs()` you can get around this for now.
Example code:
```
{
MyGraphResource::Ptr graph = MyGraphResource::create();
// Blah blah add arcs and nodes to graph. Won't crash with no arcs, because ~TypeMapBase
// does no deletes on an empty unordered_map.
// Now we go to a nested scope.
{
auto myArcs = graph->arcs();
// The destructor of the smtk::common::TypeMap runs and deletes all of the arcs in
// template <typename KeyType> inline TypeMapBase<KeyType>::~TypeMapBase()
}
// 1. |graph| reference count goes to zero.
// 2. smtk::graph::Resource::~Resource().
// 3. smtk::common::TypeMapBase<>::~TypeMapBase() tries to free the Arcs again.
}
```
Example of Seg:
```
#0 0x0000000000000051 in ?? ()
#1 0x00007fffedac65c4 in smtk::common::TypeMapBase<smtk::common::UUID>::~TypeMapBase (this=0x8e06b0,
__in_chrg=<optimized out>) at /opt/cmb-6.3.0/include/smtk/3.3.0/smtk/common/TypeMap.h:252
#2 0x00007fffedac4d52 in smtk::common::TypeMap<smtk::common::UUID>::~TypeMap (this=0x8e06b0,
__in_chrg=<optimized out>) at /opt/cmb-6.3.0/include/smtk/3.3.0/smtk/common/TypeMap.h:283
#3 0x00007fffedb7e7ec in smtk::graph::Resource<smtk::session::mysession::MeshAssemblyGraphTraits>::~Resource
(this=0x8e03f0, __in_chrg=<optimized out>)
at /opt/cmb-6.3.0/include/smtk/3.3.0/smtk/graph/Resource.h:45
#4 0x00007fffedb7e860 in smtk::resource::DerivedFrom<smtk::session::mysession::MyResource, smtk::graph::Resource<smtk::session::mysession::MyResourceGraphTraits> >::~DerivedFrom (this=0x8e03f0,
__in_chrg=<optimized out>) at /opt/cmb-6.3.0/include/smtk/3.3.0/smtk/resource/DerivedFrom.h:32
#5 0x00007fffedb81c4a in smtk::session::mysession::MyResource::~MyResource (
this=0x8e03f0, __in_chrg=<optimized out>)
at /opt/mysession/src/my_resource/MyResource.h:39
#6 0x00007fffedb81c7a in smtk::session::mysession::MyResource::~MyResource (
this=0x8e03f0, __in_chrg=<optimized out>)
at /opt/mysession/src/my_resource/MyResource.h:39
#7 0x000000000048db3e in std::_Sp_counted_ptr<smtk::session::mysession::MyResource*, (__gnu_cxx::_Lock_policy)2>::_M_dispose (this=0x8dfe60) at /usr/include/c++/5/bits/shared_ptr_base.h:374
#8 0x0000000000470cee in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x8dfe60)
at /usr/include/c++/5/bits/shared_ptr_base.h:150
#9 0x00000000004701c1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (
this=0x7fffffffd718, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:659
#10 0x000000000046fcbc in std::__shared_ptr<smtk::session::mysession::MyResource, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7fffffffd710, __in_chrg=<optimized out>)
at /usr/include/c++/5/bits/shared_ptr_base.h:925
#11 0x000000000046fcd8 in std::shared_ptr<smtk::session::mysession::MyResource>::~shared_ptr (
this=0x7fffffffd710, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr.h:93
#12 0x000000000046c412 in JsonMyResourceResourceTest_Serializes_Test::TestBody (this=0x8df500)
at /opt/mysession/tests/cxx/unittesting/UnitTestJsonMyResource.cxx:22
#13 0x00000000004b7647 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#14 0x00000000004b19d3 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#15 0x0000000000495a50 in testing::Test::Run() ()
#16 0x000000000049635a in testing::TestInfo::Run() ()
#17 0x00000000004969c5 in testing::TestCase::Run() ()
#18 0x000000000049d90a in testing::internal::UnitTestImpl::RunAllTests() ()
#19 0x00000000004b858d in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ()
#20 0x00000000004b27dd in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::Un---Type <return> to continue, or q <return> to quit---
itTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ()
#21 0x000000000049c500 in testing::UnitTest::Run() ()
#22 0x00000000004c636f in RUN_ALL_TESTS() ()
#23 0x00000000004c6309 in main ()
```
FYI @bob.obara @dcthompDavid ThompsonDavid Thompsonhttps://gitlab.kitware.com/cmb/smtk/-/issues/402Refactor PhraseModel::handle*() to allow PersistentObjects as argument2021-03-01T18:07:12-05:00chart3388Refactor PhraseModel::handle*() to allow PersistentObjects as argumentPass a set of PersisentObjects to handle* so that subclass can override handle* without needing a ComponentItemPtr. This way, handle*() can be used without a ComponentItemPtr, and hence without an Operation.Pass a set of PersisentObjects to handle* so that subclass can override handle* without needing a ComponentItemPtr. This way, handle*() can be used without a ComponentItemPtr, and hence without an Operation.chart3388chart3388https://gitlab.kitware.com/cmb/smtk/-/issues/401SBT Parser does not currently support resource items defined inside group items2020-12-15T14:45:17-05:00chart3388SBT Parser does not currently support resource items defined inside group itemsSBT Parser does not currently support resource items defined inside group items.
For example:
```
<Group Name="group">
<ItemDefinitions>
<Resource Name="resource">
<Accepts>
<Resource Name="smtk::at...SBT Parser does not currently support resource items defined inside group items.
For example:
```
<Group Name="group">
<ItemDefinitions>
<Resource Name="resource">
<Accepts>
<Resource Name="smtk::attribute::Resource"/>
</Accepts>
</Resource>
</ItemDefinitions>
</Group>
```
@am300edchart3388chart3388https://gitlab.kitware.com/cmb/smtk/-/issues/400Add missing headers to Arcs.h2020-12-15T14:46:05-05:00chart3388Add missing headers to Arcs.hArcs.h is missing two includes for unordered_set and smtk/graph/ResourceBase.h. Because the symbols are missing something that just includes Arcs.h will fail to compile.Arcs.h is missing two includes for unordered_set and smtk/graph/ResourceBase.h. Because the symbols are missing something that just includes Arcs.h will fail to compile.chart3388chart3388