[vtkusers] string compare bug?
Jeff Lee
jeff at cdnorthamerica.com
Mon Oct 7 16:25:14 EDT 2002
Are you using vtkSocketController/vtkSocketCommunicator? These objects
already do this under the hood.
-Jeff
Kevin Wright wrote:
> I just tracked down what looks like an odd bug, and I was wondering if
> anyone out there had any insight.
>
> I'm using a vtkPolyDataReader object to field incoming polydata
> definitions through a socket. I do this by reading the polydata from
> the socket into a string, then using the input string in the
> vtkDataReader.
>
> Everything generally worked fine, except in some cases the pipeline
> would not update when new data came down the socket. Eventually I
> tracked the problem down to vtkDataReader::SetInputString which,
> before assigning the string, does a string compare between the old and
> new string.
>
> When the new and old datasets were very similar (usually identical
> geometry, slightly changed scalar values) the strncmp would return a
> match. The string length was correct, and once the string compare was
> removed, everything worked fine.
>
> I'm working on a Windows 2000 machine with VC++ 6.0. I'm about to try
> the same thing on IRIX and Linux to see what happens, but I was wondering:
>
> 1. Has anyone seen this kind of behavior before?
> 2. Should the string compare really be there at all, given that these
> strings could be very long?
>
> Regards,
> Kevin.
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list