Skip to main content

Problem:

Product Name: VisiBroker for C
Product Version: 8.0
Product Component: Marshaling
Platform/OS version: All
 

You have encountered this exception sporadically.

org.omg.CORBA.MARSHAL: Invalid TypeCode offset: 84/-40 vmcid: 0x0 minor code: 0 completed: No

or

System exception `MARSHAL"Locality: exception has been generated locally Completed: maybe Minor code: 0x4f4f0026 (invalid TypeCode indirection= )

You would like to know why it occurs and how to resolve it.

Resolution:

In GIOP 1.0, when the client is invoking the server passing in a few parameters with the same data type, the client orb will marshal and stream the bytes to the server. An example of the idl structure is shown below

Module Bank{

    interface Account {

        float balance();

    };

    interface AccountManager {

        void addAccounts (in array acctlist);

    };

};

If the client is executing the addAccounts function in the Bank::AccountManger class with 3 Accounts objects in the array, a simple illustration of how the client orb will marshal the data is shown below

GIOP Header

Request Id

Type code for Array

Type code for Any

Value for Any

Type code for Any

Value for Any

Type code for Any

Value for Any

Subsequently, the CORBA specification introduces type code optimization to reduce the length of the GIOP request in GIOP 1.2. Similar data structure will be marshaled as follows:

GIOP Header

Request Id

Type code for array

Type code for Any

Value for Any

Pointer to Type Code for Any

Value for Any

Pointer to Type Code for Any

Value for Any

A CORBA.MARSHAL exception has occurred because the offset is wrong and point to an invalid type code in the input buffer. You need to disable type code optimization in both client and server. Set the property "vbroker.orb.topLevelTCIndirection=3" to turn off the Typecode optimization. Alternatively, you can also apply "vbroker.typecode.noIndirection=true" to disable all Typecode optimization. When you apply this property, the property "vbroker.orb.topLevelTCIndirection" will be disabled.

References

Backward Compatibility Issue with VisiNotify 6.5 using Typecode optimization


#indirection
#noIndirection
#marshal
#VisiBroker
#topLevelTCIndirection
#Security
#typecode