View Issue Details

IDProjectCategoryView StatusLast Update
0002557Slicer4Core: GUIpublic2017-06-07 23:27
ReporterdemianAssigned Tosankhesh 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002557: Models hierarchy: whenever the eye is clicked on a node complex hierarchy, the whole interface refreshes collapsing all nodes
Description

Loading the NAC brain atlas, http://cigl.spl.harvard.edu/publications/bitstream/download/3732 , if I expand all the nodes to the third level, or any other, where the prosencephalon is divided into telencephalon and diencephalon and click the eye on any of those to make them invisible. The whole slicer GUI refreshes: all the views go to black for a short while and all the hierarchy gets collapsed again.

PS: Sometimes the changes in opacity and color for all the hierarchical children does not work until a screen refresh is forced

Steps To Reproduce
  • Download the atlas http://cigl.spl.harvard.edu/publications/bitstream/download/3732
  • Load the scene brain-atlas-hierarchy.mrml
  • Go to the models module
  • Click on the + button of the hierarchy "Hierarchy root" to find the node brain
    • click on + to find rhombencephalon, midbrain and prosencephalon
    • click on + of the prosencephalon to find telencephalon and diencephalon
  • click on the eye corresponding to diencephalon to make it invisible
  • watch all the nodes collapse again
TagsNo tags attached.

Relationships

related to 0002841 closedsankhesh Deleting a node from tree view hierarchy in Models module crashes Slicer 
related to 0001735 closednicole Annotation widget does not maintain collapsed state after refresh. 
related to 0003007 closednicole Models are not listed in the models module 

Activities

finetjul

finetjul

2012-09-24 12:30

administrator   ~0006194

The problem here is that changing the Visibility is done as "Batch Process".
Because the Model scene model is doing LazyUpdate, when the scene ends the batchprocess state, the model is entirely re-populated, which looses the expand/collapse properties).

finetjul

finetjul

2012-09-24 12:38

administrator   ~0006195

Last edited: 2012-09-24 12:45

qMRMLSceneModel::updateScene should fire a signal before and after repopulating itself.
qMRMLSortAndFilterProxyModel should listen to this signal and propagate it.
qMRMLTreeView should listen to its model, and on sceneAboutToBeUpdated, it should save a list of all the expanded nodes. And on sceneUpdated it should restore the expansion of the nodes that where previously expanded (if they still exist).

As a side note,
vtkMRMLScene::StartState/EndState(vtkMRMLScene::BatchProcessState); shouldn't be done in qMRMLTreeView::toggleVisibility() but in vtkMRMLModelHierarchyLogic::SetChildrenVisibility() instead.

pieper

pieper

2012-10-30 11:03

administrator   ~0006922

The views should keep track of the open/close state of the tree and then restore it (if it is still valid) after the data changes. Also they should scroll to the same point.

jcfr

jcfr

2012-11-09 04:55

administrator   ~0007132

Last edited: 2012-11-09 05:27

From Julien:

[...]
To expand/collapse nodes, you need to do it through the QTreeView API via QModelIndexes :
QTreeView::isExpanded(), QTreeView::isCollapsed()
QTreeView::expand(), QTreeView::collapse()
signals:
QTreeView::expanded(), QTreeView::collapsed()

There is currently no mechanism in qMRMLTreeView to save/restore the expand/collapse state of the tree.

[...]Steve summarizes the user behavior of what I explained in more details when I wrote:
qMRMLTreeView should listen to its model, and on sceneAboutToBeUpdated, it should save a list of all the expanded nodes. And on sceneUpdated it should restore the expansion of the nodes that where previously expanded (if they still exist)

The main idea is to convert expanded indexes into a list of nodes (for saving the state), and convert back the list of nodes into indexes to expand (for restoring the state).
So qMRMLTreeViewPrivate should probably have a new member variable: a vtkCollection* of nodes to expand.
[...]

sankhesh

sankhesh

2012-11-15 08:49

developer   ~0007245

I did some elementary work on this to understand how things are wired. Thanks to Julien for his suggestions. I will add the functionality to save and restore the state for the tree view.

sankhesh

sankhesh

2012-12-19 15:51

developer   ~0007561

Pushed fix to: https://github.com/sankhesh/Slicer/commit/4f1ed29803aa9463b526ee0da583ea55169b2b1e

Kindly review.

sankhesh

sankhesh

2012-12-20 08:44

developer   ~0007562

Pushed changes: https://github.com/sankhesh/Slicer/commit/2557-Hierarchy-visibility-preservation

Kindly review them and if it is alright, I will merge the two commits before pushing to master.

sankhesh

sankhesh

2012-12-20 11:15

developer   ~0007563

Fixed in r21523 (http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21523)

nicole

nicole

2012-12-21 06:23

administrator   ~0007566

Last edited: 2012-12-21 13:56

Testing svn 21524.
Right clicking and adding a model hierarchy closes the hierarchy I'm adding it to in the Models module with that brain atlas scene (didn't occur in my simple test with fewer models and creating a whole new hierachy though).
Dropping models onto a new hierarchy doesn't cause it to expand, has to be done manually (the hierachy node GetExpanded() returns 1).
The annotations module also uses the tree view and I'm finding that if I close a ruler hierarchy and then add another fiducial to an expanded hierarchy, the ruler hierarchy opens up automatically. I'm checking for the expand all and expand to level commands that I'd spotted previously and not finding them so far.

Found a culprit:
qMRMLTreeView.cxx: has 3 calls to expandToDepth(2), in:
setSceneModel
setSortFilterProxyModel
setMRMLScene
I'll check the annotations code ot make sure I'm not resetting the mrml sceen too often (in bug 1735, Julien suggests returning if the mrml scene is the same in setMRMLScene).

The Annotations module is calling refreshTree when nodes are added, which is calling setMRMLScene which is expanding the tree to depth 2. If I take out that call (or put the check for changed mrml scene pointer there), the tree doesn't collapse, but I'm back to the problem of when I add a new hierarchy node that it's not expanded by default in the tree.
qMRMLSceneHierarchyModel::updateItemDataFromNode
deals with the state of the checkbox so that it's in synch with the Expanded state of the hierarchy node, but I'm back to the bug of adding a new hierarchy has it collapsed in the tree view by default.

Added a new bug to address this issue: 2840

nicole

nicole

2013-01-29 09:53

administrator   ~0007757

The three atlas test is failing on scene close after restoring scene views in the first atlas:
http://slicer.cdash.org/testDetails.php?test=3344280&build=59605
Attaching the debugger, the problem seems to be that the Clear call on the mrml scene gets to the scene model catching the scene closed event and calling qMRMLSceneModel::onMRMLSceneClosed, which calls this->updateScene, where the fist thing that's done is
emit sceneAboutToBeUpdated();
which triggers qMRMLTreeView::saveTreeExpandState but the node passed to the qMRMLSortFilterProxyModel::filterAcceptsNode method has a null id, causing a seg fault.

I couldn't quite see where to catch the fact that the scene has been closed and the tree expansion state doesn't need to be saved, could you take another look at it?
Ref: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21523

sankhesh

sankhesh

2013-02-03 11:19

developer   ~0007792

@Nicole, could you please outline the steps you used to reproduce the bug by attaching a debugger to the test?

nicole

nicole

2013-02-04 09:38

administrator   ~0007797

gdb bin/SlicerApp-real
run "--no-splash" "--testing" "--ignore-slicerrc" "--python-code" "import slicer.testing; slicer.testing.runUnitTest(['/projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Applications/SlicerApp/Testing/Python', '/projects/birn/nicole/Slicer42/Slicer/Applications/SlicerApp/Testing/Python'], 'AtlasTests')"

Attaching the back trace.

2013-02-04 09:38

 

abdomencrashbacktrace.txt (18,838 bytes)
[Thread 0x7fff90ab5700 (LWP 4280) exited]
ok

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: debuginfo-install GConf2-2.28.1-1.fc13.x86_64 ORBit2-2.14.18-1.fc13.x86_64 bzip2-libs-1.0.6-1.fc13.x86_64 dbus-libs-1.2.24-2.fc13.x86_64 expat-2.0.1-10.fc13.x86_64 fontconfig-2.8.0-1.fc13.x86_64 freetype-2.3.11-7.fc13.x86_64 glib2-2.24.1-1.fc13.x86_64 glibc-2.12.2-1.x86_64 lcms-libs-1.19-1.fc13.x86_64 libICE-1.0.6-2.fc13.x86_64 libSM-1.1.0-7.fc12.x86_64 libX11-1.3.1-3.fc13.x86_64 libXau-1.0.5-1.fc12.x86_64 libXcursor-1.1.10-4.fc13.x86_64 libXext-1.1.2-2.fc13.x86_64 libXfixes-devel-4.0.4-2.fc13.x86_64 libXi-devel-1.3.2-1.fc13.x86_64 libXinerama-1.1-2.fc13.x86_64 libXrandr-1.3.0-5.fc13.x86_64 libXrender-0.9.5-1.fc13.x86_64 libXt-1.0.7-1.fc13.x86_64 libgcc-4.4.5-2.fc13.x86_64 libjpeg-6b-46.fc12.x86_64 libmng-1.0.10-4.fc12.x86_64 libpng-1.2.44-1.fc13.x86_64 libstdc++-4.4.5-2.fc13.x86_64 libuuid-2.17.2-10.fc13.x86_64 libxcb-1.5-1.fc13.x86_64 libxml2-2.7.7-2.fc13.x86_64 zlib-1.2.3-23.fc12.x86_64
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff6e30a34 in qMRMLSortFilterProxyModel::filterAcceptsNode (this=0xd510750, node=0x29039b0)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSortFilterProxyModel.cxx:205
#2  0x00007ffff6e2fdae in qMRMLSortFilterHierarchyProxyModel::filterAcceptsNode (this=0xd510750, node=0x29039b0)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSortFilterHierarchyProxyModel.cxx:65
#3  0x00007ffff6e308db in qMRMLSortFilterProxyModel::filterAcceptsRow (this=0xd510750, source_row=1, source_parent=...)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSortFilterProxyModel.cxx:171
#4  0x00007fffee6c32b1 in ?? () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
#5  0x00007fffee6c3ae2 in QSortFilterProxyModel::rowCount(QModelIndex const&) const ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
#6  0x00007ffff6e412ff in qMRMLTreeViewPrivate::saveChildrenExpandState (this=0xb59c480, parentIndex=...)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLTreeView.cxx:257
#7  0x00007ffff6e41350 in qMRMLTreeViewPrivate::saveChildrenExpandState (this=0xb59c480, parentIndex=...)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLTreeView.cxx:261
#8  0x00007ffff6e41350 in qMRMLTreeViewPrivate::saveChildrenExpandState (this=0xb59c480, parentIndex=...)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLTreeView.cxx:261
---Type <return> to continue, or q <return> to quit---
#9  0x00007ffff6e43c2e in qMRMLTreeView::saveTreeExpandState (this=0xd49bc20) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLTreeView.cxx:851
#10 0x00007ffff6e6749e in qMRMLTreeView::qt_metacall (this=0xd49bc20, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0x7fffffffa840)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Libs/MRML/Widgets/moc_qMRMLTreeView.cxx:147
#11 0x00007fffed5eaf88 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#12 0x00007ffff6e6186e in qMRMLSceneModel::sceneAboutToBeUpdated (this=0xd50ee30)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Libs/MRML/Widgets/moc_qMRMLSceneModel.cxx:217
#13 0x00007ffff6dff060 in qMRMLSceneModel::updateScene (this=0xd50ee30) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSceneModel.cxx:644
#14 0x00007ffff6e02e06 in qMRMLSceneModel::onMRMLSceneClosed (this=0xd50ee30, scene=0x7b0c70) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSceneModel.cxx:1414
#15 0x00007ffff6e01511 in qMRMLSceneModel::onMRMLSceneEvent (vtk_obj=0x7b0c70, event=8707, client_data=0xd50ee30, call_data=0x0)
    at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Widgets/qMRMLSceneModel.cxx:1078
#16 0x00007fffdf4593ab in vtkCallbackCommand::Execute (this=0xd50fa30, caller=0x7b0c70, event=8707, callData=0x0)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkCallbackCommand.cxx:42
#17 0x00007fffdf53997f in vtkSubjectHelper::InvokeEvent (this=0x7af4b0, event=8707, callData=0x0, self=0x7b0c70)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:620
#18 0x00007fffdf539e8f in vtkObject::InvokeEvent (this=0x7b0c70, event=8707, callData=0x0) at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.cxx:789
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff7242ee7 in vtkObject::InvokeEvent (this=0x7b0c70, event=8707) at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/VTK/Common/vtkObject.h:214
#20 0x00007fffec2560ca in vtkMRMLScene::EndState (this=0x7b0c70, state=3) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLScene.cxx:782
#21 0x00007fffec2548f7 in vtkMRMLScene::Clear (this=0x7b0c70, removeSingletons=0) at /projects/birn/nicole/Slicer42/Slicer/Libs/MRML/Core/vtkMRMLScene.cxx:495
#22 0x00007fffc1cbaede in PyvtkMRMLScene_Clear (self=0x111d0a8, args=0x1b9b610)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Libs/MRML/Core/vtkMRMLScenePython.cxx:346
#23 0x00007ffff0e32ff6 in call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3750
#24 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#25 0x00007ffff0e338e7 in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3836
#26 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3771
#27 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#28 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7288, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x14ebbe8, defcount=1, closure=0x0) at Python/ceval.c:3000
#29 0x00007ffff0dbbfeb in function_call (func=0x14f7758, arg=0x1971ab8, kw=0x379af10) at Objects/funcobject.c:524
#30 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f7758, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#31 0x00007ffff0e31954 in ext_do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4063
#32 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2452
---Type <return> to continue, or q <return> to quit---
#33 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7300, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#34 0x00007ffff0dbbeef in function_call (func=0x14f77d0, arg=0x1b4f2d8, kw=0x0) at Objects/funcobject.c:524
#35 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f77d0, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#36 0x00007ffff0da10af in instancemethod_call (func=0x14f77d0, arg=0x1b4f2d8, kw=0x0) at Objects/classobject.c:2579
#37 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b847d0, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#38 0x00007ffff0df40dc in slot_tp_call (self=0x1b9b290, args=0x1b9b550, kwds=0x0) at Objects/typeobject.c:5372
#39 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b9b290, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#40 0x00007ffff0e32747 in do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3968
#41 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3773
#42 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#43 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7cd8, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#44 0x00007ffff0dbbfeb in function_call (func=0x14f6140, arg=0x1b42c20, kw=0x379aa30) at Objects/funcobject.c:524
#45 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f6140, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#46 0x00007ffff0e31954 in ext_do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4063
---Type <return> to continue, or q <return> to quit---
#47 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2452
#48 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7d50, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#49 0x00007ffff0dbbeef in function_call (func=0x14f61b8, arg=0x1b42b00, kw=0x0) at Objects/funcobject.c:524
#50 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f61b8, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#51 0x00007ffff0da10af in instancemethod_call (func=0x14f61b8, arg=0x1b42b00, kw=0x0) at Objects/classobject.c:2579
#52 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b84780, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#53 0x00007ffff0df40dc in slot_tp_call (self=0x1b9b310, args=0x1b9b490, kwds=0x0) at Objects/typeobject.c:5372
#54 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b9b310, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#55 0x00007ffff0e32747 in do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3968
#56 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3773
#57 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#58 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7cd8, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#59 0x00007ffff0dbbfeb in function_call (func=0x14f6140, arg=0x1b42290, kw=0x379a550) at Objects/funcobject.c:524
#60 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f6140, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
---Type <return> to continue, or q <return> to quit---
#61 0x00007ffff0e31954 in ext_do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4063
#62 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2452
#63 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x14e7d50, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=2, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#64 0x00007ffff0dbbeef in function_call (func=0x14f61b8, arg=0x1b42cb0, kw=0x0) at Objects/funcobject.c:524
#65 0x00007ffff0d8f9b3 in PyObject_Call (func=0x14f61b8, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#66 0x00007ffff0da10af in instancemethod_call (func=0x14f61b8, arg=0x1b42cb0, kw=0x0) at Objects/classobject.c:2579
#67 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b84370, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#68 0x00007ffff0df40dc in slot_tp_call (self=0x1b9b090, args=0x1b9b250, kwds=0x0) at Objects/typeobject.c:5372
#69 0x00007ffff0d8f9b3 in PyObject_Call (func=0x1b9b090, arg=<value optimized out>, kw=<value optimized out>) at Objects/abstract.c:2492
#70 0x00007ffff0e32747 in do_call (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3968
#71 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3773
#72 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#73 0x00007ffff0e338e7 in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3836
#74 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3771
#75 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
---Type <return> to continue, or q <return> to quit---
#76 0x00007ffff0e338e7 in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3836
#77 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:3771
#78 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2412
#79 0x00007ffff0e34d38 in PyEval_EvalCodeEx (co=0x1b546c0, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=0, 
    kws=<value optimized out>, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3000
#80 0x00007ffff0e34e12 in PyEval_EvalCode (co=<value optimized out>, globals=<value optimized out>, locals=<value optimized out>) at Python/ceval.c:541
#81 0x00007ffff0e5274c in run_mod (str=
    0x3791268 "import slicer.testing; slicer.testing.runUnitTest(['/projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Applications/SlicerApp/Testing/Python', '/projects/birn/nicole/Slicer42/Slicer/"..., start=257, globals=0x888e80, locals=0x888e80, flags=<value optimized out>) at Python/pythonrun.c:1351
#82 PyRun_StringFlags (str=
    0x3791268 "import slicer.testing; slicer.testing.runUnitTest(['/projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Applications/SlicerApp/Testing/Python', '/projects/birn/nicole/Slicer42/Slicer/"..., start=257, globals=0x888e80, locals=0x888e80, flags=<value optimized out>) at Python/pythonrun.c:1314
#83 0x00007ffff01da685 in PythonQt::evalScript (this=0x84d710, object=0x7fffd1de86a8, script=..., start=257)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQt.cpp:714
#84 0x00007ffff027114b in PythonQtObjectPtr::evalScript (this=0x7fffffffcf40, script=..., start=257)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK-build/PythonQt/src/PythonQtObjectPtr.cpp:65
---Type <return> to continue, or q <return> to quit---
#85 0x00007ffff1110cf4 in ctkAbstractPythonManager::executeString (this=0x6dd180, code=..., mode=ctkAbstractPythonManager::FileInput)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/CTK/Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp:263
#86 0x00007ffff52e2004 in qSlicerCoreApplication::handleCommandLineArguments (this=0x7fffffffdf20)
    at /projects/birn/nicole/Slicer42/Slicer/Base/QTCore/qSlicerCoreApplication.cxx:858
#87 0x00007ffff7212897 in qSlicerApplication::handleCommandLineArguments (this=0x7fffffffdf20) at /projects/birn/nicole/Slicer42/Slicer/Base/QTGUI/qSlicerApplication.cxx:375
#88 0x00007ffff532a34c in qSlicerCoreApplication::qt_metacall (this=0x7fffffffdf20, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x2cd90b0)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Base/QTCore/moc_qSlicerCoreApplication.cxx:152
#89 0x00007ffff7286370 in qSlicerApplication::qt_metacall (this=0x7fffffffdf20, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x2cd90b0)
    at /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/Slicer-build/Base/QTGUI/moc_qSlicerApplication.cxx:85
#90 0x00007fffed5e7252 in QObject::event(QEvent*) () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#91 0x00007fffed5d4e00 in QCoreApplication::event(QEvent*) () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#92 0x00007fffee0beb0d in QApplication::event(QEvent*) () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
#93 0x00007fffee0bafaf in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
#94 0x00007fffee0c1c8b in QApplication::notify(QObject*, QEvent*) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#95 0x00007fffed5d4dc4 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#96 0x00007fffed5d5ef1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#97 0x00007fffed602703 in ?? () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#98 0x000000376e63bd02 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#99 0x000000376e63fae8 in ?? () from /lib64/libglib-2.0.so.0
#100 0x000000376e63fc9c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#101 0x00007fffed602a1c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#102 0x00007fffee16dc0f in ?? () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtGui.so.4
#103 0x00007fffed5d4115 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#104 0x00007fffed5d4366 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
#105 0x00007fffed5d61a4 in QCoreApplication::exec() () from /projects/birn/nicole/Slicer42/Slicer4-SuperBuild-Debug/QtSDK-Release/Desktop/Qt/474/gcc/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#106 0x00000000004060ca in (anonymous namespace)::SlicerAppMain (argc=6, argv=0x7fffffffe288) at /projects/birn/nicole/Slicer42/Slicer/Applications/SlicerApp/Main.cxx:191
#107 0x00000000004061d1 in main (argc=6, argv=0x7fffffffe288) at /projects/birn/nicole/Slicer42/Slicer/Applications/SlicerApp/Main.cxx:223
(gdb) 

abdomencrashbacktrace.txt (18,838 bytes)
sankhesh

sankhesh

2013-03-13 11:34

developer   ~0008119

Last edited: 2013-03-13 11:35

Pushed topic to https://github.com/sankhesh/Slicer/commits/2557-Failing-Atlas-Tests
Kindly review.

sankhesh

sankhesh

2013-03-14 10:54

developer   ~0008121

Made the suggested changes. Fixed.

jcfr

jcfr

2013-03-19 10:55

administrator   ~0008156

Reminder sent to: finetjul

Hi Julien, looking at the patch. Looks good. Do you have any comments? Thanks

nicole

nicole

2013-03-19 11:24

administrator   ~0008163

Last edited: 2013-03-19 11:27

The fix doesn't deal with the underlying event issue I noted in note 7757 [1], and I ran across a similar crash again when restoring a scene view. In that case the node was not null, but it's id was null and searching for it in the hidden nodes list caused a crash.

[1] http://na-mic.org/Mantis/view.php?id=2557#c7757

jcfr

jcfr

2013-03-19 11:29

administrator   ~0008164

@Nicole: Thanks for commenting. Does the crash occur following the "Steps To Reproduce" reported above ? If not, could you provide Sankhesh with udpated data and steps allowing to reproduce the crash ?

nicole

nicole

2013-03-22 09:17

administrator   ~0008204

Narrowed down the crash when it didn't occur through a few steps of the automated test.
Download this .mrb file (accessible via the Brain Atlas test from the Testing, Test Cases, Atlas Tests module):
http://slicer.kitware.com/midas3/download?items=10937
Load the .mrb file
Enter the Models module first, then enter the Scene Views module.
Select the "Visual System" scene and click Restore.

There's a non zero possibility something's wrong with the visual system scene view.

sankhesh

sankhesh

2013-04-01 11:35

developer   ~0008276

Last edited: 2013-04-01 11:36

Pushed changes to: https://github.com/sankhesh/Slicer/commits/2557-Failing-Atlas-Tests

The last commit ensures the tree expansion state is saved before batch processing starts and is restored after batch processing ends.
Kindly review and test.

nicole

nicole

2013-04-08 14:00

administrator   ~0008351

That commit fixed the crash in the Brain Atlas test, and reviewing the code, it looks like it's dealing with the scene restore case more gracfully. Thanks!

sankhesh

sankhesh

2013-04-09 07:34

developer   ~0008353

Fixed: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21881

nicole

nicole

2013-04-10 10:45

administrator   ~0008366

Last edited: 2013-04-10 12:44

And the full atlas test is passing on some machines now (as opposed to none):
http://slicer.cdash.org/testSummary.php?project=1&name=py_AtlasTests&date=2013-04-10
The failed ones are mainly due to leaks: http://slicer.cdash.org/testDetails.php?test=3712405&build=84400

Some others are simply reporting an "exit abnormally error":
http://slicer.cdash.org/testDetails.php?test=3547220&build=84401

Jc: Reporting of error on windows seems to have some issue. Other information should be displated in addition to the "exit abnormally error"

factory-south-win7.kitware has a few tests that fail that way:
http://slicer.cdash.org/viewTest.php?onlyfailed&buildid=84455 [^]

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 3c75c782

2013-03-26 18:36:41

naucoin

Details Diff
BUG: check for null id

Temporary fix for the BrainAtlas scene view restore bug
http://na-mic.org/Mantis/view.php?id=2557

Issue 0002557



git-svn-id: http://svn.slicer.org/Slicer4/trunk@21843 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Libs/MRML/Widgets/qMRMLSortFilterProxyModel.cxx Diff File

Issue History

Date Modified Username Field Change
2012-09-24 06:03 demian New Issue
2012-09-24 06:03 demian Status new => assigned
2012-09-24 06:03 demian Assigned To => nicole
2012-09-24 10:36 nicole Assigned To nicole => finetjul
2012-09-24 10:36 nicole Category Module ModelMaker => GUI
2012-09-24 12:30 finetjul Note Added: 0006194
2012-09-24 12:38 finetjul Note Added: 0006195
2012-09-24 12:39 finetjul Assigned To finetjul => sankhesh
2012-09-24 12:45 finetjul Note Edited: 0006195
2012-10-30 11:03 pieper Note Added: 0006922
2012-11-06 08:04 jcfr Target Version => Slicer 4.3.0
2012-11-09 04:55 jcfr Note Added: 0007132
2012-11-09 05:27 finetjul Note Edited: 0007132
2012-11-15 08:49 sankhesh Note Added: 0007245
2012-12-12 09:25 sankhesh Status assigned => confirmed
2012-12-19 15:51 sankhesh Note Added: 0007561
2012-12-19 15:51 sankhesh Status confirmed => feedback
2012-12-20 08:44 sankhesh Note Added: 0007562
2012-12-20 11:15 sankhesh Note Added: 0007563
2012-12-20 11:15 sankhesh Status feedback => resolved
2012-12-20 11:15 sankhesh Fixed in Version => Slicer 4.2.3
2012-12-20 11:15 sankhesh Resolution open => fixed
2012-12-21 06:23 nicole Note Added: 0007566
2012-12-21 06:38 nicole Note Edited: 0007566
2012-12-21 12:09 nicole Note Edited: 0007566
2012-12-21 13:56 nicole Note Edited: 0007566
2012-12-24 14:32 sankhesh Relationship added related to 0002841
2012-12-26 11:55 nicole Relationship added related to 0001735
2013-01-29 09:53 nicole Note Added: 0007757
2013-01-29 09:53 nicole Status resolved => assigned
2013-01-29 09:53 nicole Resolution fixed => reopened
2013-02-03 11:19 sankhesh Note Added: 0007792
2013-02-04 09:38 nicole Note Added: 0007797
2013-02-04 09:38 nicole File Added: abdomencrashbacktrace.txt
2013-03-13 11:34 sankhesh Note Added: 0008119
2013-03-13 11:35 sankhesh Note Edited: 0008119
2013-03-14 10:54 sankhesh Note Added: 0008121
2013-03-19 10:55 jcfr Note Added: 0008156
2013-03-19 11:24 nicole Note Added: 0008163
2013-03-19 11:25 jcfr Relationship added related to 0003007
2013-03-19 11:27 jcfr Note Edited: 0008163
2013-03-19 11:29 jcfr Note Added: 0008164
2013-03-22 09:17 nicole Note Added: 0008204
2013-04-01 11:35 sankhesh Note Added: 0008276
2013-04-01 11:36 sankhesh Status assigned => feedback
2013-04-01 11:36 sankhesh Note Edited: 0008276
2013-04-08 14:00 nicole Note Added: 0008351
2013-04-09 07:34 sankhesh Note Added: 0008353
2013-04-09 07:34 sankhesh Status feedback => resolved
2013-04-09 07:34 sankhesh Fixed in Version => Slicer 4.3.0
2013-04-09 07:34 sankhesh Resolution reopened => fixed
2013-04-10 10:45 nicole Note Added: 0008366
2013-04-10 10:45 nicole Status resolved => closed
2013-04-10 12:44 jcfr Note Edited: 0008366
2017-06-07 23:27 Changeset attached => Slicer 2145-support-for-installing-extension-from-file 3c75c782