5.6. What’s Fixed in 4.0.0

[Critical]: System-stopping issue, such as a crash or data loss.
[Major]: Significant issue with no easy workaround.
[Minor]: Issue that usually has a workaround.
[Trivial]: Small issue, such as a typo in a log.

5.6.1. [Critical] Possible Memory Leak in Builtin Types after Allocation Error

If an allocation error occurred during creation of a builtin type, some of the allocated memory for internal members mapped as pointers may not have been released. This issue has been fixed. Now all the allocated memory for builtin types is released when errors occur during memory allocation.

[RTI Issue ID CODEGENII-1624]

5.6.2. [Critical] Using Batching for Types with Optional Members may have Caused Serialization/Deserialization Errors in Java

The serialization and deserialization of samples may have caused data corruption in types with optional members when the batching feature was enabled. The errors in the communication may have caused data corruption when samples were written and may have triggered exceptions on the Subscriber side. This issue affected Java code only. Since the issue affected both the serialization and deserialization methods, interoperability with other languages may have been affected too. This problem has been resolved.

[RTI Issue ID CODEGENII-1638]

5.6.3. [Minor] @copy Directives Resulted in Multiple Copies of Same Directive in Generated Code/Header in C++11

Copy directives (for example, copy directives related to modules) were generated multiples time, even if that didn’t make sense. This problem has been resolved. Now, a copy directive will be attached to an entity. The directive will only be generated when the related entity is generated.

For example, for the following IDL:

//@copy-c //Generated when the module moduleWithDirective is generated
module moduleWithDirective {
    //@copy-c #ifdef something generated with Foo
    struct Foo {
        //@copy-c // generated with  longWithDirective
        long longWithDirective;
    };
    //@copy-c #endif //generated with Bar
    //@copy-c #ifdef somethingNotDefined //generated with Bar
    struct Bar {
        long myLong;
    };
    //@copy-c #endif //generated with Bar as postfix directive because the closing module
};

The first line, //@copy-c //Generated when the module moduleWithDirective is generated, belongs to moduleWithDirective and will be copied only once (modules only generate code once).

The rest of the lines starting with //@copy-c will be generated multiple times when Code Generator creates code related to Foo and Bar.

[RTI Issue ID CODEGENII-1679]

5.6.4. [Minor] Publisher Listeners not Functional in Advanced Example for C++98

When generating a C++98 advanced example, the listeners on the publisher side did not work due to an error in their parameters. This problem has been resolved. Now, publisher listeners in the advanced example for C++98 will work correctly.

[RTI Issue ID CODEGENII-1703]

5.6.5. [Minor] @DDSService Interface Worked only when Defined Last in IDL

You could only define a @DDSService interface if it was the last DataType defined in the IDL. This problem has been fixed. Now, you can define more than one @DDSService interface in the IDL, and you can define a @DDSService interface before other DataTypes in the IDL.

[RTI Issue ID CODEGENII-1708]

5.6.6. [Minor] Unexpected Behavior when allocate_memory was False

When using C++98, Code Generator will create the functions create_data_w_params(), create_data(), and initialize_data(); These functions will allow you to create and initialize the Types you had previously generated with Code Generator. These functions need a parameter of type DDS_TypeAllocationParams_t, which has an attribute called allocate_memory. When calling these functions, allocate_memory must be true. If it was false, you may have had unexpected behavior, such as uninitialized members.

This problem has been resolved. Now these functions checks that allocate_memory is set to true when calling them. If it is not true, these functions will report an error and create_data_w_params() and create_data() will return NULL; initialize_data() will return DDS_RETCODE_ERROR.

[RTI Issue ID CODEGENII-1740]

5.6.7. [Trivial] Examples Generated with -advanced Option did not Assign QoS Profile to Publishers, Subscribers, or Topics

Because it does not set is_default_qos to true, the -advanced option for rtiddsgen creates entities with the QoS profile specified in USER_QOS_PROFILES.xml. Code Generator, however, did not apply that profile to Publishers, Subscribers, or Topics. This problem has been resolved. Now the -advanced option applies the specified QoS profile to all entities.

[RTI Issue ID CODEGENII-1706]