<div dir="ltr">Hi Attila,<div><br></div><div>If you are not having any problems with the values that you put into and get out of the byte streams differing, then there is no problem with the byte streams themselves not being exactly identical. These contain information other than the strings that you put in. Aside from information used in packing and unpacking the data, the TimeString structure contains a time member, which you are not setting anywhere and so will contain uninitialised values when you put it into the byte string.</div>
<div><br></div><div>Geoff<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 July 2014 18:06, Attila Bernáth <span dir="ltr"><<a href="mailto:attila.bernath@sztaki.hu" target="_blank">attila.bernath@sztaki.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Geoffrey (and those who read this),<br>
<br>
I worked quite a bit to make up a self-contained example that shows the anomaly.<br>
<br>
I have not completely succeeded.<br>
The attached code, when compiled, does not show the phenomenon. However:<br>
- the code I started with does not always show the phenomenon either<br>
(it seems that it depends on the contents of the memory),<br>
- if you compile and run the attached code with valgrind, it shows<br>
that some uninitialized values are copied into the byte arrays at some<br>
point.<br>
<br>
One more remark: the byte array that I start with in the attached code<br>
is obtained from a valid RTC::TimedStringSeq data.<br>
<br>
I have linux 12.04, and g++ of version 4.6.3<br>
<br>
Attila<br>
<br>
2014-07-23 15:05 GMT+02:00 Geoffrey Biggs <<a href="mailto:geoffrey.biggs@aist.go.jp">geoffrey.biggs@aist.go.jp</a>>:<br>
<div class="im HOEnZb">> Hi Attila,<br>
><br>
> It will be easier to investigate the behaviour you are seeing if you can<br>
> provide an example.<br>
><br>
> Geoff<br>
><br>
</div><div class="HOEnZb"><div class="h5">> On Wed, 23 Jul 2014 13:53:37 Attila Bern㙈﹀h wrote:<br>
>> Dear All,<br>
>><br>
>><br>
>> I have the following problem. I generate some RTC::TimedStringSequence<br>
>> data (say a1), then I serialize it into a byte stream (say b1) using<br>
>> the cdrMemoryStream API. Then I convert this bytestream b1 back to a<br>
>> RTC::TimedStringSequence variable (say a2): all is fine, the content<br>
>> of a1 and that of b1 is the same as far as I can judge. But if I<br>
>> convert a2 into a bytestream b2 again, then b1 and b2 differ<br>
>> sometimes. Is this possible?<br>
>><br>
>> Valgrind says that some uninitialized memory area is copied into the<br>
>> bytestreams: is this OK?<br>
>><br>
>> I can put together some minimal example, if needed.<br>
>><br>
>> Attila<br>
>> _______________________________________________<br>
>> openrtm-users mailing list<br>
>> <a href="mailto:openrtm-users@openrtm.org">openrtm-users@openrtm.org</a><br>
>> <a href="http://www.openrtm.org/mailman/listinfo/openrtm-users" target="_blank">http://www.openrtm.org/mailman/listinfo/openrtm-users</a><br>
><br>
> _______________________________________________<br>
> openrtm-users mailing list<br>
> <a href="mailto:openrtm-users@openrtm.org">openrtm-users@openrtm.org</a><br>
> <a href="http://www.openrtm.org/mailman/listinfo/openrtm-users" target="_blank">http://www.openrtm.org/mailman/listinfo/openrtm-users</a><br>
><br>
> _______________________________________________<br>
> openrtm-users mailing list<br>
> <a href="mailto:openrtm-users@openrtm.org">openrtm-users@openrtm.org</a><br>
> <a href="http://www.openrtm.org/mailman/listinfo/openrtm-users" target="_blank">http://www.openrtm.org/mailman/listinfo/openrtm-users</a><br>
><br>
</div></div><br>_______________________________________________<br>
openrtm-users mailing list<br>
<a href="mailto:openrtm-users@openrtm.org">openrtm-users@openrtm.org</a><br>
<a href="http://www.openrtm.org/mailman/listinfo/openrtm-users" target="_blank">http://www.openrtm.org/mailman/listinfo/openrtm-users</a><br>
<br></blockquote></div><br></div></div></div>