What causes 'PRESPsReaderQueue_storeQueueEntry:!deserialize' messages?

Note: Applies to RTI Connext 4.x and above.

If the publisher and subscriber applications use different data-type definitions (IDL) for the same topic, it is common to see the following messages reported by the RTI middleware:

Prior to 4.4c

Unkeyed Data

PRESPsReaderQueue_storeQueueEntry:!deserialize PRESPsReaderQueue_newData:!store entry

Keyed Data

PRESCstReaderCollator_storeCollatorEntry:!deserialize
PRESCstReaderCollator_newData:!add entry

After 4.4d

PRESPsReaderQueue_storeSampleData:!deserialize
PRESPsReaderQueue_storeSampleToEntry:!store sample data
PRESPsReaderQueue_newData:!get entries

After 5.3.0

PRESPsReaderQueue_storeSampleData:deserialize sample error in topic 'FooTopic' with type 'FooType'

To correct the problem, use the same IDL definition for both applications and regenerate the plugin code using rtiddsgen. When replacing the existing code, you will need to use rtiddsgen's -replace option.

Comments

I've noticed in 5.0.0 that the !deserialize warning also occurs when an enum field is set to an invalid literal.  For instance:

I have the following data type in one of my DDS messages:
enum StateEnum {

VALID=1,

INVALID=2

};

If I set an instance of StateEnum to 0, my code compiles without warning/error but I see the !deserialize message in my subscriber application.

Hi Nick,

Thanks for pointing that out. The deserialize error that you receive is a little different that the one on the title of this solution. It looks like this: 

PRESPsReaderQueue_storeSampleData:!deserialize

I think it will be a good idea to make this solution a more generic solution for any !deserialize error. I'll make the changes and add your case.

Bobby