troubleshooting return_loan function
Hi,
I am just starting with CoreDx and I am trying to do one example similar to an echo function.
- On one side I have a program "sender" (publisher and subscriber) with creates the contents
- and on the other side I have the "receiver" similar to an echo response with also one publisher and one subscriber.
The sender will create a number of messages and will wait for the echo from the other side.
The sender has obviously one FooDataReader and one FooDataWriter.
The problem appears when calling the FooDataReader->return_loan function. It produces a segmentation fault and I don't know why.
A little part of my code is:
static FooPtrSeq FooDataList;
DDS::SampleInfoSeq infoList;
static FooDataReader *FooDataReader = NULL;
FooDataReader->return_loan (&FooDataList, &infoList);
Any suggestion will be welcome.
Thanks
Comments
First, I would suggest
First, I would suggest testing the return value from the FooDataReader->read/take() operation. If this is not RETCODE_OK, then it is not appropriate to call 'return_loan()' afterwards.
Also, I think it would be helpful to see a little more of your test code. Feel free to e-mail to support@twinoakscomputing.com if you don't want to share it on the forum...
Thank you for the question. And, let us know if you need further help!