View Issue Details

IDProjectCategoryView StatusLast Update
0002989Slicer4Core: Base Codepublic2017-06-07 23:27
Reporterjohan.andruejol Assigned Tojcfr  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.2-1 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.1 
Summary0002989: Loading the same color table node twice crashes Slicer.
Description

Steps to reproduce:
Loading a color table.
Then loading it again and Slicer crashes.

TagsNo tags attached.

Activities

jcfr

jcfr

2013-09-03 05:31

administrator   ~0009823

Last edited: 2013-09-03 05:31

Was able to reproduce this problem. Slicer r22390 [local build / Ubuntu 10.04]

1) cd Slicer-src
cp ./Base/Logic/Resources/ColorFiles/SPL-BrainAtlas-ColorFile.txt ~/Desktop/My-Color.txt

2) Start Slicer

3) Add Data -> Select "My-Color.txt"

If you Open "Data" module - You can see a new color node

4) Add Data -> Select "My-Color.txt"

5) Crash :(

jcfr

jcfr

2013-09-03 09:49

administrator   ~0009840

After adding few debug statements here is what I get, for the second loading, a new name is assigned and no ID is set.

---------- vtkMRMLColorLogic::CreateFileNode -----------
vtkMRMLColorLogic - colorStorageNode:0x25b94e0 - ID:vtkMRMLColorTableStorageNode17
vtkMRMLColorLogic - ctnode:0x54d03e0 - ID:(null)
vtkMRMLColorLogic - ctnode:0x54d03e0 - Name:JC-Color
vtkMRMLColorLogic - 0 - node:0x54d03e0 - ID:(null)
vtkMRMLColorLogic - 1 - node:0x54d03e0 - ID:vtkMRMLColorTableNodeFileJC-Color.txt
qSlicerColorsIO - node:0x54d03e0 - ID:vtkMRMLColorTableNodeFileJC-Color.txt
"Color" Reader has successfully read the file "/home/jchris/Desktop/JC-Color.txt"

---------- vtkMRMLColorLogic::CreateFileNode -----------
vtkMRMLColorLogic - colorStorageNode:0x54a1b50 - ID:vtkMRMLColorTableStorageNode18
vtkMRMLColorLogic - ctnode:0x54d6150 - ID:(null)
vtkMRMLColorLogic - ctnode:0x54d6150 - Name:JC-Color_1
vtkMRMLColorLogic - 0 - node:0x54d6150 - ID:(null)
vtkMRMLColorLogic - 1 - node:0x54d6150 - ID:(null)

jcfr

jcfr

2013-09-03 10:30

administrator   ~0009842

Fixed in r22394
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22394

pieper

pieper

2013-10-09 05:27

administrator   ~0010159

Can you close this issue now?

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014594

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file b985899f

2013-09-03 14:29:44

jcfr

Details Diff
BUG: Fix crash preventing the same color file to be loaded more than once

As the documentation associated "AddNode" method explains, in the case
of singleton node, the return node should be considered instead of the
one passed to the method.

AddNode documentation:

/// [...]
/// If node is a singleton, and a node of the same class with the
/// same singleton tag already exists in the scene, \a nodeToAdd is NOT
/// added but its properties are copied (c.f. vtkMRMLNode::CopyWithScene())
/// into the already existing singleton node. That node is then returned.

Fixes 0002989

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

Issue History

Date Modified Username Field Change
2013-02-28 05:23 johan.andruejol New Issue
2013-02-28 05:23 johan.andruejol Status new => assigned
2013-02-28 05:23 johan.andruejol Assigned To => jcfr
2013-02-28 08:58 jcfr Priority normal => high
2013-02-28 08:58 jcfr Target Version => Slicer 4.3.0
2013-09-03 05:28 jcfr Severity minor => crash
2013-09-03 05:31 jcfr Note Added: 0009823
2013-09-03 05:31 jcfr Note Edited: 0009823
2013-09-03 05:31 jcfr Note Edited: 0009823
2013-09-03 09:49 jcfr Note Added: 0009840
2013-09-03 10:30 jcfr Note Added: 0009842
2013-09-03 10:30 jcfr Status assigned => resolved
2013-09-03 10:30 jcfr Fixed in Version => Slicer 4.3.0
2013-09-03 10:30 jcfr Resolution open => fixed
2013-10-09 05:27 pieper Note Added: 0010159
2013-10-09 05:43 johan.andruejol Status resolved => closed
2013-10-09 05:43 johan.andruejol Fixed in Version Slicer 4.3.0 => Slicer 4.3.1
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file b985899f
2017-06-07 23:27 jcfr Note Added: 0014594