Ok.. I found a workaround by changing my data convertion &
computation programs to use vtkDoubleArray's instead of
vtkFloatArray's. Of course, this doubles the size of my VTK
files, but I don't see why this would change the segfault/success
aspect of anything?<br>
<br>
Ideas?<br><br><div><span class="gmail_quote">On 9/29/05, <b class="gmail_sendername">Randall Hand</b> <<a href="mailto:randall.hand@gmail.com">randall.hand@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Didn't get any answer from the user's list, so I'm reposting it
here. Basically want to know how I could write 50+ files using a
vtkDataSetWriter that I can't read with a vtkDataSetReader, and lookin
for a workaround. <div><span class="e" id="q_106a35ec9a665a1d_1"><br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Randall Hand</b> <<a href="mailto:randall.hand@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
randall.hand@gmail.com</a>>
<br>Date: Sep 29, 2005 8:45 AM<br>Subject: Problem with vtkDataSetReader<br>To: vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">vtkusers@vtk.org</a>>
<br><br></span>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><span>
<br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.yeraze.com</a>
</span><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.yeraze.com
</a>
</span></div></blockquote></div><br><br clear="all"><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>