View Issue Details

IDProjectCategoryView StatusLast Update
0003250Slicer4Module Volumespublic2017-09-27 13:36
ReporterEthanAssigned Tojcfr 
PrioritylowSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product VersionSlicer 4.2.0 
Target VersionbacklogFixed in Version 
Summary0003250: Error logged when Threshold slider reaches 0-0
Description

Slicer crashes when the Threshold slider bar is moved to 0-0. This only seems to happen when the histogram is visible.

Steps:
Open sample CTACardio.nrrd
Select the Volumes Module
Un-hide the histogram
Set the lower threshold to zero (by typing in the spin box)
Set the upper threshold to 300
Use the slider to bring the upper threshold to zero.

Additional Information

Attached a TXT of the Slicer output messages.

The Volumes Module also displays a threshold range that is larger than the actual range (about -1024 to 3480). Not sure if this has been described before.

TagsNo tags attached.

Activities

2013-07-26 06:27

 

crash.txt (1,727 bytes)
Number of registered modules: 127 

Number of instantiated modules: 127 
Number of loaded modules: 127 
Show module (name): "Welcome" 
"Volume" Reader has successfully read the file "/tmp/Slicer/RemoteIO/CTA-cardio.nrrd" 
Show module (name): "Volumes" 
setRange -1e+06 1e+06 
end setRange 
setRange -1e+06 1e+06 
end setRange 
setRange -1e+06 1e+06 
end setRange 
setRange -1e+06 1e+06 
end setRange 
setRange -1e+06 1e+06 
end setRange 
setRange -1e+06 1e+06 
end setRange 
setRange -10136 12644 
end setRange 
setSingleStep 100 
min slider:  0 max slider 99 
min spinbox:  0 max spinBox 99 
min single step:  100 
setValues -1479.6 3987.6 
equal:  3988 3988 4.54747e-13 1 
end setValues 
setRange -10136 12644 
end setRange 
setSingleStep 10 
min slider:  0 max slider 99 
min spinbox:  0 max spinBox 99 
min single step:  10 
setSingleStep 100 
min slider:  0 max slider 99 
min spinbox:  0 max spinBox 99 
min single step:  100 
setValues -1479.6 3987.6 
equal:  3988 3988 4.54747e-13 1 
end setValues 
setRange -1479.6 3987.6 
end setRange 
setValues -32768 32767 
end setValues 
setValues -32768 32767 
end setValues 
setValues 0 3988 
end setValues 
setValues 0 30 
end setValues 
setValues 0 300 
end setValues 
setValues 0 280 
end setValues 
setValues 0 110 
end setValues 
setValues 0 90 
end setValues 
setValues 0 0 
end setValues 
ASSERT: "rgb[0] >= 0. && rgb[0] <= 1. && rgb[1] >= 0. && rgb[1] <= 1. && rgb[2] >= 0. && rgb[2] <= 1." in file /home/ej/software/public/Slicer/Slicer4-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKColorTransferFunction.cpp, line 123
error: [/data/ej/software/public/Slicer/Slicer4-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.


crash.txt (1,727 bytes)
pieper

pieper

2013-08-06 04:13

administrator   ~0009384

Here are the last few lines of the error log for reference:

end setValues
setValues 0 300
end setValues
setValues 0 280
end setValues
setValues 0 110
end setValues
setValues 0 90
end setValues
setValues 0 0
end setValues
ASSERT: "rgb[0] >= 0. && rgb[0] <= 1. && rgb[1] >= 0. && rgb[1] <= 1. && rgb[2] >= 0. && rgb[2] <= 1." in file /home/ej/software/public/Slicer/Slicer4-SuperBuild-Debug/CTK/Libs/Visualization/VTK/Core/ctkVTKColorTransferFunction.cpp, line 123
error: [/data/ej/software/public/Slicer/Slicer4-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

finetjul

finetjul

2013-08-07 12:14

administrator   ~0009426

Postponed to 4.4 because it's a minor issue:

  • happens rarely
  • only in debug (assert)
jcfr

jcfr

2014-05-14 12:29

administrator   ~0011855

As of Slicer r23177 built with VTK6 enabled, I was able to reproduce this problem.

jcfr

jcfr

2014-05-15 05:41

administrator   ~0011861

Issue is as line 260 of qSlicerScalarVolumeDisplayWidget.css:

https://github.com/Slicer/Slicer/blob/03d871adad9a7e8659b01f226baa8f672c4d2077/Modules/Loadable/Volumes/Widgets/qSlicerScalarVolumeDisplayWidget.cxx#L260

More specifically, the rgb colors are set to -0.00000238664 when upper and lower threshold are 0

low -> 0 [threshold low value]
upper -> 0 [threshold upper value]
min -> low + 0.001 -> 0.001
max -> 419
maxVal -> (upper - min)/(max-min) -> -0.001 / (419 - 0.001) -> -0.00000238664

jcfr

jcfr

2014-05-20 09:58

administrator   ~0011922

After discussing with Julien, the solution would be to "properly" implement the transfer function by using the "nextHigher" function. see [1]

That way, we wouldn't have to use the value 0.001 that doesn't work in some case.

[1] https://github.com/commontk/CTK/blob/488631a0f5cefd2384e77bbc4dfe228c873541f6/Libs/Visualization/VTK/Widgets/ctkVTKThresholdWidget.cpp#L60

lassoan

lassoan

2017-06-10 00:57

developer   ~0014723

It works correctly in Slicer 4.7.0-2017-06-02. There were related fixes.

lassoan

lassoan

2017-06-10 01:01

developer   ~0014724

Error logs are still visible when using Slicer 4.7.0-2017-06-02, so the problem is not solved, but this is only a debug assertion, not an application crash.

Issue History

Date Modified Username Field Change
2013-07-26 06:27 Ethan New Issue
2013-07-26 06:27 Ethan File Added: crash.txt
2013-08-06 04:13 pieper Note Added: 0009384
2013-08-06 04:13 pieper Status new => assigned
2013-08-06 04:13 pieper Assigned To => finetjul
2013-08-06 04:14 pieper Target Version => Slicer 4.3.0
2013-08-07 12:12 finetjul Target Version Slicer 4.3.0 => Slicer 4.4.0
2013-08-07 12:13 finetjul Assigned To finetjul => jcfr
2013-08-07 12:14 finetjul Note Added: 0009426
2014-05-14 12:29 jcfr Note Added: 0011855
2014-05-15 05:41 jcfr Note Added: 0011861
2014-05-20 09:58 jcfr Note Added: 0011922
2014-05-20 09:58 jcfr Status assigned => acknowledged
2014-05-20 09:58 jcfr Target Version Slicer 4.4.0 =>
2014-05-20 09:59 jcfr Target Version => Slicer 4.5.0-1
2015-11-02 11:11 jcfr Target Version Slicer 4.5.0-1 => Slicer 4.5.1
2016-10-12 03:12 jcfr Priority normal => low
2016-10-12 03:12 jcfr Target Version Slicer 4.5.1 => Slicer 4.7.0
2017-06-10 00:57 lassoan Status acknowledged => resolved
2017-06-10 00:57 lassoan Resolution open => unable to reproduce
2017-06-10 00:57 lassoan Note Added: 0014723
2017-06-10 01:01 lassoan Status resolved => acknowledged
2017-06-10 01:01 lassoan Note Added: 0014724
2017-06-10 01:02 lassoan Severity crash => minor
2017-06-10 01:02 lassoan Resolution unable to reproduce => open
2017-06-16 00:28 lassoan Summary Crash when Threshold slider reaches 0-0 => Error logged when Threshold slider reaches 0-0
2017-09-27 13:36 lassoan Target Version Slicer 4.7.0 => backlog