4. What’s Fixed in 4.6.0

This section describes bugs fixed in Code Generator 4.6.0 (Connext 7.6.0). These are fixes since Code Generator 4.5.0, described in Previous Releases.

Connext 7.6.0 is an early access release. See the Connext Versions and Lifecycle page for more information on RTI’s software release model.

[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.

4.1. [Major] Symbols for a sequence of a forward-declared type were not exported on Windows

On Windows systems, the symbols for a sequence of a forward-declared type were not exported correctly when using the C language. As a result, attempting to use the sequence API from another library led to linker errors.

For example, if you generated code for the following IDL and included it in a library, FooSeq functions automatically generated by rtiddsgen from another library could not be called due to missing exported symbols.

struct Foo;

struct Bar {
.   sequence<Foo> m1;
};

struct Foo {
.   long m1;
};

[RTI Issue ID CODEGENII-2246]

4.2. [Major] Union Discriminator default value was not aligned with XTypes Specification

Union discriminators were set to select a value that selects the default union member, if one is defined, or otherwise to the lowest value associated with any member. This behavior was not compliant with the OMG ‘Extensible and Dynamic Topic Types for DDS’ specification, version 1.3.

Now, discriminators are initialized to the default value of the discriminator type. This means 0 for numeric discriminators, false for boolean discriminators, and the first literal of the enumeration for enumerated discriminators. As a result, the discriminator may not select any member upon initialization if no union branch matches that default value.

For example, given the following IDL:

union my_union switch (long) {
     case 1: long m;
}

Previously, the discriminator was initialized to 1. Now, the discriminator is initialized to 0, which does not select any member.

If you want to preserve the previous behavior, see the Migration Guide for instructions on updating the Extensible Types compliance mask.

[RTI Issue ID CODEGENII-1550]

4.3. [Major] XML keywords in default strings generated incorrect code

Consider the following type:

<struct name= "MyStruct">
  <member name="text" stringMaxLength="255" type="string" default="Hello &quot;World&quot;"/>
</struct>

Instead of generating "Hello "World"" for the generated code or the generated IDL, this example generated "Hello "World"", producing code that didn’t compile and an invalid IDL.

[RTI Issue ID CODEGENII-2278]

4.4. [Minor] Code Generator threw unexpected operator error in Linux and macOS

When executing Code Generator from a directory with spaces in the pathname, the following error displayed:

./with spaces/rti_connext_dds-7.5.0/bin/rtiddsgen: 43: [: /home/username/testing/with: unexpected operator

The error occurred in Linux and macOS systems; it did not affect Code Generator functionality.

[RTI Issue ID CODEGENII-2252]

4.5. [Minor] Compilation error when using constant strings with modern C++ new mapping (IDL4 to C++) and C++17/C++20

Code generated for the modern C++ new mapping (IDL4 to C++) could have failed to compile when constant strings were used as parameters in constructors or other methods, and the compiler was set to use C++17 or C++20. This issue occurred because the generated code mapped constant strings to std::string_view, but the constructors and methods did not accept std::string_view parameters. The generated code now properly supports std::string_view for constant string parameters when using C++17 or C++20.

[RTI Issue ID CODEGENII-2233]

4.6. [Minor] recvfrom failure during Code Generator server shutdown

A request sent during the Code Generator server’s shutdown window (due to inactivity) could be accepted by the socket but never processed. This caused clients to hang while waiting for a handshake and to eventually report the following error:

RTIDDSGEN_socketReceive: OS recvfrom() failure, error 0X68: Connection reset by peer

This problem has been fixed; additionally, the default server inactivity timeout has been increased to 120 seconds.

[RTI Issue ID CODEGENII-2263]

4.7. [Trivial] Compilation error when generating example for C++11 with Zero Copy transfer over shared memory and IDL4 C++ mapping

If an example was generated using the command rtiddsgen -language C++11 -standard IDL4_CPP -example x64Linux4gcc7.3.0 for a type annotated with @transfer_mode(SHMEM_REF), compilation errors would occur.

[RTI Issue ID CODEGENII-2295]