[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mico-devel
Subject:    [mico-devel] Pragma interface version w/Combat and Mico
From:       "David Magnuson" <david_magnuson () hotmail ! com>
Date:       2005-08-11 22:32:26
Message-ID: BAY102-F13123528689036C8941EB7ECBD0 () phx ! gbl
[Download RAW message or body]

Hello,

We're trying to debug a Mico problem and wanted to tap into the collective 
wisdom of the mico-devel mailing list.  My co-worker has stated the problem 
as we currently understand it in the emails below.

Thanks in advance for any guidance you can give us.

David Magnuson
david_magnuson@hotmail.com
****************************************

    We are working to debug and fix what appears to be a defect in the Mico 
distribution.  The essence of what we're dealing with is detailed below.  We 
would greatly appreciate any and/or all help you are willing to offer.

    After debugging this issue some more it appears the use of a versioned 
data structure, DataType:1.3 in the construction of DataUnion in the example 
shown below, is not acceptable to the interface repository.  Interestingly, 
use this IDL code snippet:

module Foo {

  enum DataType {
    tXmlSerializedValue
  };
  #pragma version DataType 1.2

  union DataUnion switch (DataType) {
    case tXmlSerializedValue:  string ValueSerializedString;
  };

};

Then compile using Mico's IDL compiler:

$ idl --nocodegen-c++ --codegen-idl --emit-repoids <file>

Now take the IDL generated by the Mico IDL compiler (previous step) and use 
it a different way (with the ird running):

$ idl --nocodegen-c++ --feed-ir --feed-inclued-defs -ORBInitRef ... 
<newFile>

What we find is the IDL generated by the Mico IDL compiler can not be fed 
into the IR.

    Are we using data versioning incorrectly?  Have other users commented on 
issues related to this?  Are you aware of any outstanding Mico defects of 
this type?

    Thanks in advance.


		-- Bruce Mayes

P.S.  We're running a variety of platforms from HP-UX (11i), to Linux 
(Redhat 9), to Windows (XP SP2).  We're compiling Mico and Combat using gcc 
3.2.2.


______________________________________________
Subject:	Combat / Mico

We recently switched to interface versioning and this has proved problematic 
for Mico / Combat.  Consider an IDL snippet:

enum DataType {
  ...
};
#pragma version IFoo::DataType 1.3

typedef union DataUnion switch (DataType) {
  ...
};
#pragma version IFoo::DataFormat 1.2

struct Data {
  string Name;
  DataUnion Value;
};
#pragma version IFoo::Data 1.2
typedef sequence<Data> DataSequence;

This caused Mico's IDL compiler some problems.  Marshallers for the Data 
sequence were not generated.  After looking through the Mico IDL compiler we 
discovered the sequence definition was based on IDL:IFoo/Data:1.0 when in 
fact it should be based on version 1.2.  A fairly simple change to 
DB::set_repoids fixed the issue (effectively copying the section of code 
that updates pseudo_ids for ID changes to objects to the section of code 
that updates version numbers for objects).  At this point we are 
successfully compiling IDL.

    Our next task involved getting "idl2tcl" to work.  Unfortunately, it 
also appears to have issues with the "#pragma" definitions.  Compiling the 
code fragment listed above, idl2tcl generates the error:

error while feeding IDL files to IFR: uncaught MICO exception: 
IDL:omg.org/CORBA/BAD_PARAM:1.0 (0, not-completed)

then dumps core.  The failure is in CORBA::Container_stub::create_alias(), 
specifically the __req.invoke() call appears to be failing and throwing an 
exception.

    So here is the question.  Before trying to understand and fix this issue 
we would like to understand what you know of Mico / Combat support for 
versioned data structures and interfaces.  Sequences of a versioned data 
structure were the first stumbling block although we believe we have found a 
work-around for that.  We're not yet sure what this second issue is -- with 
idl2tcl -- although commenting out the version specifications allows us to 
build the Tcl helper.  (Could our fix to generate marshallers for sequenced 
data be causing an issue here?)

    Any thoughts or comments would be most appreciated.    Thanks in advance 
for any help you can offer.


		-- Bruce Mayes


P.S. We're running Mico version 2.3.11 and Combat version 0.7.3.


_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic