6. Known Issues

Note

For an updated list of critical known issues, see the Critical Issues List on the RTI Customer Portal at https://support.rti.com.

6.1. Classes and Types Defined in Some .NET Namespaces Cannot be used to Define User Data Types

The name of the classes and types defined in the following .NET namespaces cannot be used to define user data types:

  • System

  • System::Collections

  • DDS

For example, if you try to define the following enumeration in IDL:

enum StatusKind{

    TSK_Unknown,

    TSK_Auto

};

The compilation of the generated CPP/CLI code will fail with the following error message:

error C2872: 'StatusKind' : ambiguous symbol

The reason for this error message is that the enumeration StatusKind is also defined in the DDS namespace and the generated code includes this namespace using the “using” directive:

using namespace DDS;

The rational behind using the “using” directive was to make the generated code shorter and more readable.

[RTI Issue ID CODEGEN-547]

6.2. Code Generation for Inline Nested Structures, Unions, and Valuetypes not Supported

Code generation for inline nested structures, unions, and valuetypes is not supported. For example, Code Generator will produce erroneous code for these structures:

IDL:

struct Outer {

    int16 outer_short;

    struct Inner {

        char inner_char;

        int16 inner_short;

    } outer_nested_inner;

};

XML:

<struct name="Outer">

    <member name="outer_short" type="int16"/>

    <struct name="Inner">

        <member name="inner_char" type="char"/>

        <member name="inner_short" type="int16"/>

    </struct>

</struct>

[RTI Issue ID CODEGEN-54]

6.3. .NET Code Generation for Multi-Dimensional Arrays of Sequences not Supported

The .NET code generated by Code Generator for multi-dimensional arrays of sequences is not correct and will not compile.

For example:

struct MyStruct {

    sequence<short, 4> m1[3][2];

};

[RTI Issue IDs CODEGENII-317, CODEGEN-376]

6.4. Request and Reply Topics Must be Created with Types Generated by Code Generator—C API Only

When using the C API to create Request and Reply Topics, these topics must use data types that have been generated by Code Generator. Other APIs support using built-in types and DynamicData types.

[RTI Issue ID REQREPLY-37]

6.5. Error Generating Code for Type whose Scope Name Contains Module Called “idl”

When generating code for a file that has a member whose scope contains a module called “idl,” Code Generator will report an error and will not generate code.

For example, Code Generator will not generate code for IDL with a module called “idl” such as this:

module idl {

    struct test{

        int32 m3;

    };

};

struct myStruct {

    idl::test m4;

};

The above produces this error:

Foo.idl line 11:4 no viable alternative at character ':'

ERROR com.rti.ndds.nddsgen.Main Foo.idl line 11:1 member

type 'dl::test' not found

The workaround for this issue is to prepend an underscore character (‘_’) to the idl module name.

[RTI Issue ID CODEGENII-661]

6.6. Examples and Generated Code for Visual Studio 2017 and later may not Compile (Error MSB8036)

This Known Issue is also in the Known Issues of the Core release notes

The examples provided with Connext and the code generated for Visual Studio 2017 and later will not compile out of the box if the Windows SDK version installed is not a specific number like 10.0.15063.0. If that happens, you will see the compilation error MSB8036. To compile these projects, select an installed version of Windows SDK from the Project menu -> Retarget solution.

Another option is to set the environment variable RTI_VS_WINDOWS_TARGET_PLATFORM_VERSION to the SDK version number. For example, set RTI_VS_WINDOWS_TARGET_PLATFORM_VERSION to 10.0.16299.0. (Note: the environment variable will not work if you have already retargeted the project via the Project menu.)

For further details, see the Windows chapter of the Core Libraries Platform Notes.

[RTI Issue ID CODEGENII-800]

6.7. Invalid XSD File from an IDL/XML File if Input File Contains a Range Annotation inside a Structure and a typedef of that Structure

Code Generator generates an invalid XSD file from an IDL/XML file if the input file contains a range annotation (@min, @max, @range) inside a structure (struct/valuetype/union) and a typedef of that structure

For example, consider the following IDL file:

module M1 {
        struct VT1 {
                @min(0)
                int32 vt1_m1;
        };
};

typedef M1::VT1 myVT1;

This IDL file generates the following XSD file, which cannot be validated because the myVT1 complexType contains the same elements as its base M1.VT1, and that’s not compliant with the XSD grammar:

<xsd:schema ...>
  <xsd:complexType name= "M1.VT1">
    <xsd:sequence>
                <xsd:element name="vt1_m1" minOccurs="1" maxOccurs="1">
          <xsd:simpleType>
            <xsd:restriction base="xsd:int">
              <xsd:minInclusive value="0"/>
            </xsd:restriction>
          </xsd:simpleType>
          </xsd:element>
</xsd:sequence>
</xsd:complexType>
 <!-- @struct true -->
  <xsd:complexType name="myVT1">
    <xsd:complexContent>
      <xsd:restriction base="tns:M1.VT1">
        <xsd:sequence>
                      <xsd:element name="vt1_m1" minOccurs="1" maxOccurs="1">
              <xsd:simpleType>
                <xsd:restriction base="xsd:int">
                  <xsd:minInclusive value="0"/>
                </xsd:restriction>
              </xsd:simpleType>
              </xsd:element>
        </xsd:sequence>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
</xsd:schema>

If you try to use the generated XSD file, Code Generator will fail to validate the XSD file and throw one of the following errors:

ERROR com.rti.ndds.nddsgen.xml.XSDParser File couldn't be validated
ERROR com.rti.ndds.nddsgen.xml.XSDParser file:<...> Line: 24 Column: 33;rcase-Recurse.2: There is not a complete functional mapping between the particles.
ERROR com.rti.ndds.nddsgen.xml.XSDParser File couldn't be validated
ERROR com.rti.ndds.nddsgen.xml.XSDParser file:///<...> Line: 16 Column: 33;rcase-NameAndTypeOK.7: The type of element 'vt1_m1', 'null', is not derived from the type of the base element, 'null'.particles.

The workaround for this issue is to disable XSD validation in Code Generator by enabling the option -disableXSDValidation.

Note

If the structure doesn’t contain any range annotations, the generated XSD file will be validated.

[RTI Issue ID CODEGENII-1217]

6.8. Warnings when Compiling Generated Code for Traditional C++ with -O3 flag and IDL Contains FlatData types

Some C++ compilers will generate -Wmaybe-uninitialized warnings when compiling traditional C++ code (-language C++98) with the compiler’s -O3 optimization, if the IDL file contains a FlatData type with multiple sequences using FlatData, such as:

@language_binding(FLAT_DATA)
@mutable struct test {
    sequence<char, 3> myCharSeq;
    sequence<uint16, 7> myUnsignedShortSeq;
};

To avoid this warning, you can define RTI_FLAT_DATA_CXX11_RVALUE_REFERENCES. This preprocessor option turns on C++11 rvalue references in the FlatData headers, disabling a pre-C++11 workaround where the warning occurs. You can define this option through the gcc command line (-DRTI_FLAT_DATA_CXX11_RVALUE_REFERENCES) or at the beginning of the type implementation file (if the IDL is Foo.idl, this file is Foo.cxx).

This warning doesn’t not occur when generating code for the Modern C++ API (-language C++11).

[RTI Issue ID CODEGENII-1327]

6.9. Recursive Structures not Supported in Python and ADA

The OMG ‘Interface Definition Language’ specification, version 4.2 allows forward declarations to implement recursion: “Structures may be forward declared, in particular to allow the definition of recursive structures.” While Connext supports forward declarations, it does not currently support recursive structures in Python and ADA.

[RTI Issue ID CODEGENII-1411]

6.10. Code Generator Server Cannot be Parallelized

Each execution of Code Generator server is attached to a port where itreceives requests, and it can only generate code for one request at atime. Therefore, if you try to send multiple requests simultaneously,*Code Generator* server will process them sequentially.

[RTI Issue ID CODEGENII-666]

6.11. 64-bit Discriminator Values Greater than (2^31-1) or Smaller than (-2^31) not Supported

Unions with a 64-bit integer discriminator type containing discriminator values that cannot fit in a 32-bit value are not supported when using the following language bindings:

  • C

  • Traditional C++

  • Modern C++

  • C#

  • Java

  • Python

  • DynamicData (regardless of the language)

They are also not supported with ContentFilteredTopics, regardless of the language binding.

Using label values greater than 32-bit may lead to receiving samples with invalid content or to filtering samples incorrectly.

[RTI Issue ID CORE-11437]

6.12. Code Generator Performance Degraded After Apache Velocity 2.3 Update

Updating Apache Velocity™ from version 1.7 to 2.3 caused a performance degradation in Code Generator. With Apache Velocity 2.3, Code Generator 3.1.1 and newer will take up to twice as long for the same IDL as Code Generator 3.1.0 or older.

The Apache Velocity update was introduced in Connext 6.1.1. Apache Velocity was updated because a vulnerability was found in version 1.7.

[RTI Issue ID CODEGENII-1834]

6.13. To Declare Arrays as Optional in Python, They Must be Aliased

When generating Python code, arrays cannot be declared as optional unless they are aliased.

[RTI Issue ID CODEGEN-2043]