MantisBT - VTK
View Issue Details
0012786VTK(No Category)public2011-12-09 09:352012-04-16 20:22
Pavel Pokutnev 
Lisa Avila 
highminorhave not tried
closedfixed 
5.8.0 
 
TBD
crash
0012786: BUG in vtkFixedPointVolumeRayCastMapper
There are some int overflow bugs in vtkFixedPointVolumeRayCastMapper, if used with big volumes [2000 * 2000 * 2000] > [max(int) = 2147483647] and shading enabled.

BUG 1: Line 2787 / 2788
  int sliceSize = dim[0]*dim[1]*((independent)?(components):(1));
  int numSlices = dim[2];
should be:
  vtkIdType sliceSize = dim[0]*dim[1]*((independent)?(components):(1));
  vtkIdType numSlices = dim[2];
because of line 2840, 2848, … where the actual int overflow happens (numSlices * sliceSize)!

BUG 2: Line 98
  int x, y, z;
should be:
  vtkIdType x, y, z;
because of line 171, where the actual int overflow happens (dptr = dataPtr + z * dim[0] * dim[1] + y * dim[0] + xlow;)

Attached to this bug report you will find the fixed version of vtkFixedPointVolumeRayCastMapper.cxx.
No tags attached.
cxx vtkFixedPointVolumeRayCastMapper.cxx (110,696) 2011-12-09 09:35
https://www.vtk.org/Bug/file/9087/vtkFixedPointVolumeRayCastMapper.cxx
Issue History
2011-12-09 09:35Pavel PokutnevNew Issue
2011-12-09 09:35Pavel PokutnevFile Added: vtkFixedPointVolumeRayCastMapper.cxx
2011-12-09 09:56Utkarsh AyachitAssigned To => Lisa Avila
2011-12-09 09:56Utkarsh AyachitStatusbacklog => tabled
2012-02-21 18:03David GobbiNote Added: 0028316
2012-04-16 20:22David GobbiNote Added: 0028481
2012-04-16 20:22David GobbiStatustabled => closed
2012-04-16 20:22David GobbiResolutionopen => fixed

Notes
(0028316)
David Gobbi   
2012-02-21 18:03   
This bug should be fixed by the following commits, which were merged into master on Feb 21, 2012:

ba9d3759ff57d36007318d21811042ba414442e1
aacb6cf3acab9a25d5ec445056f7d16b778fa935
(0028481)
David Gobbi   
2012-04-16 20:22   
The bug was fixed by the following commit:
a3feef0dff8ab684fa6c3834f6e7a67ad3af37f1
BUG 12810: Fix for int overflows in volume rendering module.
Use vtkIdType for increment calculations in order to avoid 32-bit
overflow in the volume mapper.

Commit was merged into master on April 7, 2012,
and fix will be present in VTK 6.0.
The merge commit is as follows:
fc4c570a71cdc1deede305d8bfa8e014f811ffa2

Fix was verified by user on April 16, 2012.