[vtkusers] string compare bug?

Kevin Wright krw at viz-solutions.com
Mon Oct 7 16:58:19 EDT 2002


At 04:25 PM 10/7/2002 -0400, you wrote:
>Are you using vtkSocketController/vtkSocketCommunicator?  These objects 
>already do this under the hood.
>-Jeff

No, I'm tying it in with some other code here.  Are you saying that 
vtkSocketController/Communicator addresses the bug that I'm talking about, 
or that it provides the same functionality?

Kevin.


>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