MantisBT - VTK
View Issue Details
0000813VTK(No Category)public2004-04-29 20:012016-08-12 09:54
Mathieu Malaterre 
Berk Geveci 
highmajoralways
closedmoved 
 
 
0000813: Bug int vtkDataSetAttributes when Array are NULL
Hi,

I'm trying to use vtkClipPolyData to clip some tubes produced by a vtkTubeFilter. Everything is working well if I don't set scalars to my vtkPolyData (the input of the vtkTubeFilter). However, I need to set the scalars to use the SetVaryRadiusToVaryRadiusByScalar().

The debugger returns a runtime error in the function
vtkDataSetAttributes::InterpolateTuple() of the vtkDataSetAttributes.cxx
class (ln 1079).

I'm using VTK from CVS updated this morning on a Win2K platform with MSVC
6.0
Am I doing something wrong?

Thanks for the help,
No tags attached.
cxx clip-crash.cxx (2,798) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5092/clip-crash.cxx
Issue History
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036723
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0001002)
Mathieu Malaterre   
2004-04-29 20:02   
Adding the backtrace:

[Thread debugging using libthread_db enabled]
[New Thread -1084759936 (LWP 5113)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1084759936 (LWP 5113)]
0x0087b2d1 in vtkDataSetAttributes::CopyTuple(vtkDataArray*, vtkDataArray*, int, int) (this=0x9bb3480, fromData=0x9bb43f0, toData=0x9bb7da0, fromId=1,
    toId=0) at /home/malaterre/Kitware/VTK/Common/vtkDataSetAttributes.cxx:721
721 *to++ = *from++;
(gdb) bt
#0 0x0087b2d1 in vtkDataSetAttributes::CopyTuple(vtkDataArray*, vtkDataArray*, int, int) (this=0x9bb3480, fromData=0x9bb43f0, toData=0x9bb7da0, fromId=1,
    toId=0) at /home/malaterre/Kitware/VTK/Common/vtkDataSetAttributes.cxx:721
#1 0x0087ac1e in vtkDataSetAttributes::CopyData(vtkDataSetAttributes*, int, int) (this=0x9bb3480, fromPd=0x9bb45d0, fromId=1, toId=0)
    at /home/malaterre/Kitware/VTK/Common/vtkDataSetAttributes.cxx:533
#2 0x0098d560 in vtkTriangle::Clip(double, vtkDataArray*, vtkPointLocator*, vtkCellArray*, vtkPointData*, vtkPointData*, vtkCellData*, int, vtkCellData*, int) (this=0x9bbdf58, value=0, cellScalars=0x9bbe580, locator=0x9bb7c18, tris=0x9bb3d50, inPd=0x9bb45d0, outPd=0x9bb3480, inCd=0x9bb3078, cellId=0,
    outCd=0x9bb3500, insideOut=0) at /home/malaterre/Kitware/VTK/Common/vtkTriangle.cxx:890
#3 0x0098f3d6 in vtkTriangleStrip::Clip(double, vtkDataArray*, vtkPointLocator*, vtkCellArray*, vtkPointData*, vtkPointData*, vtkCellData*, int, vtkCellData*, int) (this=0x9bbd980, value=0, cellScalars=0x9bbd010, locator=0x9bb7c18, tris=0x9bb3d50, inPd=0x9bb45d0, outPd=0x9bb3480, inCd=0x9bb3078, cellId=0,
    outCd=0x9bb3500, insideOut=0) at /home/malaterre/Kitware/VTK/Common/vtkTriangleStrip.cxx:311
#4 0x008a745f in vtkGenericCell::Clip(double, vtkDataArray*, vtkPointLocator*, vtkCellArray*, vtkPointData*, vtkPointData*, vtkCellData*, int, vtkCellData*, int) (this=0x9bbd900, value=0, cellScalars=0x9bbd010, locator=0x9bb7c18, connectivity=0x9bb3d50, inPd=0x9bb45d0, outPd=0x9bb3480, inCd=0x9bb3078,
    cellId=0, outCd=0x9bb3500, insideOut=0) at /home/malaterre/Kitware/VTK/Common/vtkGenericCell.cxx:148
#5 0x002b182e in vtkClipPolyData::Execute() (this=0x9bb31e8) at /home/malaterre/Kitware/VTK/Graphics/vtkClipPolyData.cxx:261
#6 0x009763cf in vtkSource::ExecuteData(vtkDataObject*) (this=0x9bb31e8, output=0x9bb3270) at /home/malaterre/Kitware/VTK/Common/vtkSource.cxx:500
#7 0x00975ff6 in vtkSource::UpdateData(vtkDataObject*) (this=0x9bb31e8, output=0x9bb3270) at /home/malaterre/Kitware/VTK/Common/vtkSource.cxx:410
#8 0x008748eb in vtkDataObject::UpdateData() (this=0x9bb3270) at /home/malaterre/Kitware/VTK/Common/vtkDataObject.cxx:354
0000009 0x00874605 in vtkDataObject::Update() (this=0x9bb3270) at /home/malaterre/Kitware/VTK/Common/vtkDataObject.cxx:253
#10 0x0097544a in vtkSource::Update() (this=0x9bb31e8) at /home/malaterre/Kitware/VTK/Common/vtkSource.cxx:136
0000011 0x08049533 in main () at /home/malaterre/Kitware/Test/clip-crash.cxx:103
(0001003)
Mathieu Malaterre   
2004-04-29 20:03   
Adding the vFilter->GetOutput()->Print( cout ):

...
  Point Data:
    Debug: Off
    Modified Time: 186
    Reference Count: 1
    Registered Events: (none)
    Number Of Arrays: 3
    Array 0 name = NULL
    Array 1 name = NULL
    Array 2 name = TubeNormals
    Number Of Components: 5
    Number Of Tuples: 0
...

I would say that vtkAssignAttributes is not skipping the NULL array.
(0001004)
Mathieu Malaterre   
2004-04-30 12:40   
Changing the Summary to something more accurate.
(0001078)
Mathieu Malaterre   
2004-05-18 17:06   
An easy work around is to do:

vScalars->SetName( "default" );
(0036723)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.