[vtk-developers] Re: Problem with vtkDataSetReader

Randall Hand randall.hand at gmail.com
Fri Sep 30 12:19:29 EDT 2005


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?

Ideas?

On 9/29/05, Randall Hand <randall.hand at gmail.com> wrote:
>
> 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.
>
> ---------- Forwarded message ----------
> From: Randall Hand <randall.hand at gmail.com>
> Date: Sep 29, 2005 8:45 AM
> Subject: Problem with vtkDataSetReader
> To: vtkusers <vtkusers at vtk.org>
>
> 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
>
> --
> Randall Hand
> Visualization Scientist,
> ERDC-MSRC Vicksburg, MS
> Homepage: http://www.yeraze.com
>



--
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/vtk-developers/attachments/20050930/f54045fb/attachment.htm>


More information about the vtk-developers mailing list