5.17. APIs (Multiple Languages)
5.17.1. [Major] The result of cdr_serialized_sample_max_size was too small if the maximum size was greater than 4 GB
If a data type included sequences that caused its maximum serialized
size to be greater than 4 GB, then the result of calling the TypeCode
cdr_serialized_sample_max_size API was too small due to an integer
overflow. This problem affected all language APIs and has been fixed by
making this API return 2 GB under this circumstance.
[RTI Issue ID CORE-15726]
5.17.2. [Major] DynamicData Errors when operating on unions with unknown discriminator values
A union’s discriminator value may not select any member in the union.
When this was the case, if the union was converted to a string with the
FooTypeSupport::data_to_string() API (rti::topic::to_string()
API in Modern C++) or printed using the DynamicData::print() API,
the following errors were printed:
DDS_DynamicData2Visitor_visitMember:type not supported (DDS_TK_NULL)
DDS_DynamicData2Visitor_visitMember:!Error visiting union discriminator
DDS_DynamicData2Visitor_visitContainer: Error visiting MyUnion
DDS_DynamicData2_printI:!visit container
Now, the sample will be correctly printed with just the discriminator value and no associated member value.
The Modern C++ DynamicData::get_discriminator() API also failed to
retrieve the discriminator value with an exception and the following
errors:
DDS_DynamicData2UnionPlugin_getMemberInfo: Cannot find a member with id 0 in type MyUnion
DDS_DynamicData2_get_member_info_by_index:!get_member_info
This fix also addresses RTI Issue IDs [CORE-14055] and [CORE-14443].
[RTI Issue ID CORE-14582]
5.17.3. [Major] Non-Java register_type failed if the maximum size was greater than 2 GB
If a data type’s maximum serialized size was greater than 2 GB, then the
DomainParticipant register_type API failed with errors such as
these:
RTIXCdrInterpreter_getSerSampleMaxSize:<type>:<field> skip error
RTIXCdrInterpreter_generateTypePluginProgram:failure generating get_max_serialized_size program for type
DDS_DomainParticipant_register_type:!failed to register user type with participant
This problem only affected Connext 6.0.0 and above and all language APIs except for Java. This problem has been fixed by making this API succeed under this circumstance. Connext supports registering types whose theoretical maximum serialized size is greater than 2 GB, as long as the samples that are written are never greater than 2 GB.
[RTI Issue ID CORE-12308]
5.17.4. [Minor] Enum label not printed when there was only one enum member
By default, when printing TypeCodes (using the
DDS_TypeCode_to_string APIs), the ordinal values associated with an
enum are only printed if they are explicitly provided in the type
definition. There was a bug where the ordinal value was never printed
(even if it was explicitly supplied in the type definition) if there was
only one member in the enum.
[RTI Issue ID CORE-15715]
5.17.5. [Minor] Creating a DomainParticipant with a negative domain ID was incorrectly allowed
The API Reference
documentation
for create_participant states that the domainId has [range]
[>=0]. However, this range was not enforced, and DomainParticipant
creation incorrectly succeeded if the domainId was a negative
integer. Now, DomainParticipant creation will fail with this error
message:
DDS_DomainParticipantFactory_create_participant_disabledI:BAD PARAMETER FAILURE | domainId must be between 0 and 2147483647.
[RTI Issue ID CORE-5910]