IBM Support

PI62777: ATTRIBUTE INITIALIZATION MISSING IN CODE

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • An attribute initialized in the model is not actually
    initialized in the code. I am generating C code.
    The initialization is done in the Init method below. Just the
    "working" attribute is initialized, whereas a similar attribute
    (called "not_working") does not show up in the code.
    
    /*## class TestClass */
    void TestClass_Init(TestClass* const me) {
        me->working = 13;
        RiCTask_init(&(me->ric_task), RiCFALSE, NULL);
    }
    
    If the model is opened in Rhapsody in C++ and the language is
    changed to C++, not_working has "static" checked.  (isStatic is
    set to 1 if you check the model in the API)
    
    Rhapsody should ignore Static check-box when generating code
    from C class, or instead generate the static attribute as a
    global variable in the same way as it is generated from a File
    element. The current algorithm doesn't take the reported
    scenario (converting language of class having static variables).
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Rhapsody users                                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Attribute initialization missing in code for attribute that  *
    * is set to static and then place into C class                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • Fixed in Rhapsody 8.2
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI62777

  • Reported component name

    TLOGIC RHAPSODY

  • Reported component ID

    5724V74RP

  • Reported release

    812

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-05-19

  • Closed date

    2016-12-05

  • Last modified date

    2016-12-05

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC RHAPSODY

  • Fixed component ID

    5724V74RP

Applicable component levels

  • R812 PSN

       UP



Document information

More support for: Rational Rhapsody

Software version: 8.1.2

Reference #: PI62777

Modified date: 05 December 2016