[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: [vtkusers] Problem with vtkDataSetReader
From: Randall Hand <randall.hand () gmail ! com>
Date: 2005-09-29 13:45:57
Message-ID: b02264720509290645f05c11e () mail ! gmail ! com
[Download RAW message or body]
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
[Attachment #3 (text/html)]
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.<br>
<br>
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:<br>
<br style="font-family: courier new,monospace;">
<div style="margin-left: 40px;"><span style="font-family: courier \
new,monospace;">Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, \
line 170</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;">vtkDataSetReader (10037248): \
vtkDataSetReader (10037248): returning LookupTableName of (null)</span><br \
style="font-family: courier new,monospace;"> <br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;">Debug: In \
/viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line 176</span><br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning \
FieldDataName of (null)</span><br style="font-family: courier new,monospace;"> <br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, \
line 181</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;">vtkDataSetReader (10037248): \
vtkDataSetReader (10037248): returning ReadAllScalars of 0</span><br \
style="font-family: courier new,monospace;"> <br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;">Debug: In \
/viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line 187</span><br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning \
ReadAllVectors of 0</span><br style="font-family: courier new,monospace;"> <br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, \
line 193</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;">vtkDataSetReader (10037248): \
vtkDataSetReader (10037248): returning ReadAllNormals of 0</span><br \
style="font-family: courier new,monospace;"> <br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;">Debug: In \
/viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line 199</span><br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning \
ReadAllTensors of 0</span><br style="font-family: courier new,monospace;"> <br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, \
line 205</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;">vtkDataSetReader (10037248): \
vtkDataSetReader (10037248): returning ReadAllColorScalars of 0</span><br \
style="font-family: courier new,monospace;"> <br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;">Debug: In \
/viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, line 211</span><br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">vtkDataSetReader (10037248): vtkDataSetReader (10037248): returning \
ReadAllTCoords of 0</span><br style="font-family: courier new,monospace;"> <br \
style="font-family: courier new,monospace;"> <span style="font-family: courier \
new,monospace;">Debug: In /viz/home/rhand/src/ezViz/Utilities/VTK/IO/vtkDataReader.h, \
line 217</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;">vtkDataSetReader (10037248): \
vtkDataSetReader (10037248): returning ReadAllFields of 0</span><br \
style="font-family: courier new,monospace;"> <br clear="all">
</div>
At this point in the code, i've only done the following:<br>
<span style="font-family: courier new,monospace;"> vtkDataSetReader \
*reader = vtkDataSetReader::New();</span><br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;"> \
reader->DebugOn();</span><br style="font-family: courier new,monospace;"> <span \
style="font-family: courier new,monospace;"> \
reader->SetFileName(argv[1]);</span><br style="font-family: courier \
new,monospace;"> <span style="font-family: courier new,monospace;"> \
reader->Update();</span><br> <br>
A dbx on the coredump shows the following:<br>
<div style="margin-left: 40px; font-family: courier new,monospace;">dbx version 7.3.4 \
(86441_Nov11 MR) Nov 11 2002 11:31:55<br> Core from signal SIGSEGV: Segmentation \
violation<br> (dbx) where<br>
Thread 0x10000<br>
> 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]<br>
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]<br>
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]<br>
(dbx)<br>
<br>
<br>
</div>
Anyone have any idea what's going wrong?<br>
<br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, \
MS<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic