You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an empty polydata (without setting any points, lines) is sent, an runtime exception will be thrown when unpacking the data. The exception is only occured in the release mode. The reason is that if the points is NULL, the PackBody() call in the igtlPolyDataMessage.cxx will return immediately without setting the polydata header. Thus, the data in the polydata header is incorrect during unpacking.
The error can be reproduced with the PolyData example, in which we create a new function e.g. SendEmptyPolyData as follows:
If an empty polydata (without setting any points, lines) is sent, an runtime exception will be thrown when unpacking the data. The exception is only occured in the release mode. The reason is that if the points is NULL, the PackBody() call in the igtlPolyDataMessage.cxx will return immediately without setting the polydata header. Thus, the data in the polydata header is incorrect during unpacking.
The error can be reproduced with the PolyData example, in which we create a new function e.g. SendEmptyPolyData as follows:
int SendEmptyPolyData(igtl::Socket::Pointer& socket, const char* name)
{
igtl::PolyDataMessage::Pointer polyDataMsg;
polyDataMsg = igtl::PolyDataMessage::New();
polyDataMsg->SetDeviceName(name);
polyDataMsg->Pack();
socket->Send(polyDataMsg->GetPackPointer(), polyDataMsg->GetPackSize());
return 1;
}
and call this function instead of SendPolyData.
The text was updated successfully, but these errors were encountered: