epics-base / normativeTypesCPP

normativeTypesCPP is an EPICS V4 C++ module
http://epics-pvdata.sourceforge.net/index.html
Other
2 stars 8 forks source link

NTNDArrayAttributeBuilder's tags field is not being properly reset #11

Closed brunoseivam closed 7 years ago

brunoseivam commented 7 years ago

NTNDArrayAttributeBuilder's tags field is being ignored inside the reset method. This is causing generated NTNDArrayAttribute's to randomly contain or not the tags field, triggering epics-base/pvAccessCPP#40 issue for me.

mdavidsaver commented 7 years ago

12 fixes clear bug, although I don't see how this triggers epics-base/pvAccessCPP#40. I'll have to investigate this further.

brunoseivam commented 7 years ago

This triggers what I was seeing.

Now that I am thinking about it, the issue in this snippet seems to be that I am putting a PVStructure that is different than the one advertised.

This was happening inadvertently then the tags field was being erroneously and silently added.

mdavidsaver commented 7 years ago

Ok, that makes some sense. In my mind "Not-a-first segmented message expected" equates to a (de)serialization error. Right now there is not a lot of protection against this kind of error and more needs to be added.

At the same time, I don't think that building new types so frequently is such a good idea. To me this is an initialization activity for a server.