[vtkusers] Problem with vtkDataSetReader
Randall Hand
randall.hand at gmail.com
Thu Sep 29 09:45:57 EDT 2005
I have a piece of code that loads a text file into memory as a vtkImageData,
and then hooks it to a vtkDataSetWriter to write it to a binary Legacy VTK
file. That seems to work just fine, and i've been using it for months
without any trouble.
However, I just converted a new file and when I try to load it with a
separate VTK program, it segfaults. This new imaging app seems to be fine,
as I can run it with other (larger 768^3 and smaller 128^3) datasets, but
this 640^3 yields segfaults. By enabling ->DebugOn on the reader, I see the
following just prior to crash:
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
170
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
LookupTableName of (null)
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
176
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
FieldDataName of (null)
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
181
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllScalars of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
187
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllVectors of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
193
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllNormals of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
199
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllTensors of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
205
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllColorScalars of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
211
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllTCoords of 0
Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line
217
vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning
ReadAllFields of 0
At this point in the code, i've only done the following:
vtkDataSetReader *reader = vtkDataSetReader::New();
reader->DebugOn();
reader->SetFileName(argv[1]);
reader->Update();
A dbx on the coredump shows the following:
dbx version 7.3.4 (86441_Nov11 MR) Nov 11 2002 11:31:55
Core from signal SIGSEGV: Segmentation violation
(dbx) where
Thread 0x10000
> 0 std::__find_if(const char*,const
char*,std::unary_negate<std::__N1::Is_mask>,std::random_access_iterator_tag)(0x7ffdf8000b9,
0x800df8000ba, 0x85e0c84, 0x8000000810037820, 0x100000001, 0x0, 0x19,
0x1003be40)
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/stl_algo.h":159,
0xd8b6ba0]
1 std::ctype<char>::scan_not(std::ctype_base::mask,const char*,const char*)
const(0xd9587c4, 0x80000008, 0x85e0c84, 0x8000000810037820, 0x100000001,
0x0, 0x19, 0x1003be40)
["/j10/mtibuild/v741m/workarea/v7.4.1m/libC/include/stl_algo.h":200,
0xd8b7e14]
2 std::_Scan_for_not_wspace<std::char_traits<char> >::operator()(const
char*,const char*) const(this = 0xfffffff97c0, __first = 0x7ffdf8000b9,
__last = 0x800df8000ba = "")
["/opt/pkg/MIPSpro/7.4/usr/include/CC/istream":323, 0x41f9d20]
(dbx)
Anyone have any idea what's going wrong?
--
Randall Hand
Visualization Scientist,
ERDC-MSRC Vicksburg, MS
Homepage: http://www.yeraze.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050929/bf9d9b41/attachment.htm>
More information about the vtkusers
mailing list