View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003382 | Slicer4 | Core: CLI infrastructure | public | 2013-09-09 09:07 | 2015-09-09 08:29 |
Reporter | fedorov | Assigned To | millerjv | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.5.0-1 | Fixed in Version | Slicer 4.5.0-1 | ||
Summary | 0003382: Crash while attempting to read a MultiVolume node produced by a CLI | ||||
Description | Reproducible with the PkModeling extension at this branch: https://github.com/fedorov/PkModeling/tree/save-concentrations-and-fit Crash messages: ModuleType: SharedObjectModule slicer:0x11d736b30 --processinformationaddress 0x7fb1929d9e90 --T1Blood 1600 --T1Tissue 1597 --relaxivity 0.0039 --S0grad 15.0 --fTolerance 1e-4 --gTolerance 1e-4 --xTolerance 1e-5 --epsilon 1e-9 --maxIter 200 --hematocrit 0.4 --aucTimeInterval 90 --roiMask slicer:0x7fb191435ce0#vtkMRMLScalarVolumeNode2 --prescribedAIF /var/folders/sl/6ssprw115g3bkfgm9cyzg0940000gn/T/Slicer/CEDEG_vtkMRMLDoubleArrayNodeB.mcsv --outputKtrans slicer:0x7fb191435ce0#vtkMRMLScalarVolumeNode3 --outputVe slicer:0x7fb191435ce0#vtkMRMLScalarVolumeNode4 --outputRSquared slicer:0x7fb191435ce0#vtkMRMLScalarVolumeNode5 --concentrations /var/folders/sl/6ssprw115g3bkfgm9cyzg0940000gn/T/Slicer/CEDEG_vtkMRMLMultiVolumeNodeD.nrrd --fitted /var/folders/sl/6ssprw115g3bkfgm9cyzg0940000gn/T/Slicer/CEDEG_vtkMRMLMultiVolumeNodeE.nrrd /var/folders/sl/6ssprw115g3bkfgm9cyzg0940000gn/T/Slicer/CEDEG_vtkMRMLMultiVolumeNodeB.nrrd PkModeling standard output: ctest needs: CTEST_FULL_OUTPUT ERROR: In /Users/fedorov/github/Slicer/Libs/vtkITK/vtkITKArchetypeImageSeriesScalarReader.cxx, line 160 ERROR: In /Users/fedorov/github/Slicer/Libs/MRML/Core/vtkMRMLVolumeArchetypeStorageNode.cxx, line 398 ERROR: In /Users/fedorov/github/Slicer/Libs/vtkITK/vtkITKArchetypeImageSeriesScalarReader.cxx, line 160 ERROR: In /Users/fedorov/github/Slicer/Libs/MRML/Core/vtkMRMLVolumeArchetypeStorageNode.cxx, line 398 error: [/Users/fedorov/local/builds/Slicer4-Release/Slicer-build/bin/Slicer.app/Contents/MacOS/./Slicer] exit abnormally - Report the problem. | ||||
Tags | No tags attached. | ||||
I see what is happening. The outputs of a CLI are ultimately read into Slicer using the vtkSlicerApplicationLogic::ProcessReadNodeData() method. If there is a StorageNode attached to the node, then that is what is used to read in the data. If there not a StorageNode attached to the node, then the method tries to create one. The create logic is hardcoded for the volume node types in the Slicer trunk. Since many of the volume node types are specializations of other volume node types, there is a precedence in the search for a compatible storage node type. Unfortunately, MultiVolume is not in the Slicer trunk, so a case cannot be hard coded for it. But I recall adding something to MRML a while back so that you could ask a node to create a storage node of the appropriate type. Perhaps a block of code with this hard coded specialization can be replaced with that. |
|
Try this change diff --git a/Base/Logic/vtkSlicerApplicationLogic.cxx b/Base/Logic/vtkSlicerAppl
|
|
The node is read correctly as multivolume, but the display node is incorrectly set to ScalarVolumeDisplayNode. |
|
Okay. This next one it trickier. Add a method CreateDefaultDisplayNodes() in MRMLMultiVolumeNode. See the MRMLFiberBundleNode for a reference. The method is defined in MRMLDisplayableNode. Then apply this diff (assuming the previous diff was applied). diff --git a/Base/Logic/vtkSlicerApplicationLogic.cxx b/Base/Logic/vtkSlicerAppl
|
|
This is hack but it may work. Basically, the CreateDefaultDisplayNodes() does what we want but it didn't exist when we wrote ProcessReadNodeData() method. Unfortunately, CreateDefaultDisplayNodes() has not been propagated through the node types. Ideally, we should be able to call sn = storableNode->CreateDefaultStorageNode(); and eliminate almost all the code in ProcessReadNodeData(). |
|
Jim can you clarify; 1) CreateDefaultDisplayNodes() is defined on the MRMLNode, not on MRMLDisplayableNode - is this correct? ==>
2) long lines in your patch are incomplete |
|
1) CreateDefaultDisplayNodes() is defined on MRMLDisplayableNode NOT on MRMLNode. So you have to cast the node to a MRMLDisplayableNode before you can call it. 2) Sorry about the truncation in the patch. Here is a better one diff --git a/Base/Logic/vtkSlicerApplicationLogic.cxx b/Base/Logic/vtkSlicerApplicationLogic.cxx
|
|
Here is a patch ignoring space changes diff --git a/Base/Logic/vtkSlicerApplicationLogic.cxx b/Base/Logic/vtkSlicerApplicationLogic.cxx
|
|
Sorry about that, you had "DisplayableNode", but I was thinking "DisplayNode" ... Thank you for the corrections. |
|
This seems to work. Should I submit a pull request to Slicer trunk when done or will you integrate? Will update MultiVolume MRML in the external module too. We should probably coordinate with JC to have this backported to 4.3 - do you foresee any issue with that? |
|
Fixes to MultiVolume MRML: https://github.com/fedorov/MultiVolumeExplorer/commit/ab7eb9411c5eaacacf81685b4c7e05cf1935d9a3 Corresponding update in Slicer r22420 (todo ask JC to backport). Patched Slicer branch: https://github.com/fedorov/Slicer/tree/3382-fix-loading-multivolumes-from-CLIs |
|
The issue is that the above is kind of a hack. I could see someone editting it out because it is not clear why it is needed. For maintainability, I would prefer that fix the ProcessReadNodeData() method to transition all the special case code to method calls in the underlying nodes (e.g. CreateDefaultStorageNode(), CreateDefaultDisplayNodes(), whatever else we need). It is a pretty big change. Really should change all the DisplayableNodes to have a CreateDefaultDisplayNodes method. That would need a good bit of testing. Plus it looks like the Freesurfer path is little more complicated. Not sure I am comfortable doing it in a rush to backport to 4.3 in the next few days. |
|
Sounds good. We should decide what to do with PkModeling. I think the recent patches add important functionality, but not sure they should be included in the 4.3 release of the extension if we know that running it from the GUI will crash Slicer. |
|
Working on a new version of PrcessReadNodeData(). Patch will either
|
|
Reminder sent to: millerjv Jim, do you have an estimate when this crash will be fixed? |
|
Thanks for the reminder. I had completely forgotten about it. I'll take some time to study it again and see if I still like the solution I had planned. |
|
Thank you Jim. If there is something I can help with, let me know. |
|
Shall we target the 4.4 release for this? |
|
Jim, any updates? Do you think this will be fixed for 4.4? |
|
Target 4.4 |
|
Jim says, we should try to apply the patch he suggested early in the history of this bug. I will try that and report if this fixes the problem. |
|
Patch integrated with today's master, and is available in the pull request here: https://github.com/Slicer/Slicer/pull/225 Jim confirmed he is going to review and add comments before merging. |
|
Merged with master in 23876 and 23877. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-09 09:07 | fedorov | New Issue | |
2013-09-09 09:07 | fedorov | Status | new => assigned |
2013-09-09 09:07 | fedorov | Assigned To | => millerjv |
2013-09-09 09:48 | millerjv | Note Added: 0009903 | |
2013-09-09 10:07 | millerjv | Note Added: 0009905 | |
2013-09-09 10:29 | fedorov | Note Added: 0009908 | |
2013-09-09 10:52 | millerjv | Note Added: 0009910 | |
2013-09-09 10:55 | millerjv | Note Added: 0009911 | |
2013-09-09 13:17 | fedorov | Note Added: 0009913 | |
2013-09-09 13:25 | millerjv | Note Added: 0009914 | |
2013-09-09 13:27 | millerjv | Note Added: 0009915 | |
2013-09-09 13:28 | fedorov | Note Added: 0009916 | |
2013-09-09 14:29 | fedorov | Note Added: 0009917 | |
2013-09-09 14:49 | fedorov | Note Added: 0009918 | |
2013-09-09 14:54 | millerjv | Note Added: 0009919 | |
2013-09-09 15:02 | fedorov | Note Added: 0009920 | |
2013-09-23 11:52 | millerjv | Note Added: 0010065 | |
2013-10-01 12:16 | jcfr | Target Version | => Slicer 4.3.1 |
2013-10-01 12:17 | jcfr | Target Version | Slicer 4.3.1 => Slicer 4.3.2 |
2014-02-04 08:38 | fedorov | Note Added: 0010556 | |
2014-02-04 08:49 | millerjv | Note Added: 0010557 | |
2014-02-04 12:14 | fedorov | Note Added: 0010560 | |
2014-03-06 09:39 | pieper | Note Added: 0011244 | |
2014-03-06 10:15 | nicole | Target Version | Slicer 4.3.2 => Slicer 4.4.0 |
2014-03-26 08:21 | fedorov | Note Added: 0011464 | |
2014-04-24 09:59 | millerjv | Note Added: 0011663 | |
2014-04-24 10:00 | millerjv | Note Edited: 0011663 | |
2014-09-25 12:49 | jcfr | Target Version | Slicer 4.4.0 => Slicer 4.4.1 |
2015-01-07 11:50 | fedorov | Note Added: 0012853 | |
2015-01-07 11:50 | fedorov | Assigned To | millerjv => fedorov |
2015-01-08 12:23 | fedorov | Assigned To | fedorov => millerjv |
2015-01-08 12:24 | fedorov | Note Added: 0012863 | |
2015-01-12 12:18 | fedorov | Note Added: 0012882 | |
2015-01-13 03:13 | fedorov | Status | assigned => closed |
2015-01-13 03:13 | fedorov | Resolution | open => fixed |
2015-01-13 03:13 | fedorov | Fixed in Version | => Slicer 4.4.1 |
2015-09-09 08:29 | jcfr | Fixed in Version | Slicer 4.4.1 => Slicer 4.5.0-1 |
2015-09-09 08:29 | jcfr | Target Version | Slicer 4.4.1 => Slicer 4.5.0-1 |