Open Kygandomi opened 6 years ago
This is probably unrelated to your bug, but I highly recommend you use the igtl::MessageFactory for creating messages.
This ensures messages are created properly and ready for use. This may circumvent your bug.
@adamrankin That sounds like a good idea to try. Do you know where I can find an example of how to setup igtl::MessageFactory to receive data?
Some code excerpted from https://github.com/IGSIO/UWPOpenIGTLink/blob/master/UWPOpenIGTLink/Content/IGTClient.cxx#L858
m_igtlMessageFactory = igtl::MessageFactory::New();
...
auto headerMsg = m_igtlMessageFactory->CreateHeaderMessage(IGTL_HEADER_VERSION_1);
...
numOfBytesReceived = SocketReceive(headerMsg->GetBufferPointer(), headerMsg->GetBufferSize());
...
int c = headerMsg->Unpack(1);
...
igtl::MessageBase::Pointer bodyMsg = nullptr;
try
{
bodyMsg = m_igtlMessageFactory->CreateReceiveMessage(headerMsg);
}
catch (const std::exception&)
{
...
}
...
if (typeid(*bodyMsg) == typeid(igtl::TrackedFrameMessage))
{
Hello,
We are running an OpenIGTLink Server on an sbRIO-9651 module running real time linux and we are running into a bus error when a point message is sent from 3D Slicer (or other external OpenIGTLink clients).
The server has been able to reliably receive transform data and other IGTLink data types such as String and Status, but point message throws a bus error specifically when the Unpack() method is called in the following code. Is there something I am missing ?