Sequences

Jörg Narr jnarr@Comsys.DoFN.DE
Fri, 10 Oct 1997 12:23:23 +0200


Hi experts,

since nobody has any problems out there I hope you are happy to see
that at least I have a problem:

I use the following IDL-Code:

interface CORBAMSG_ValueDef 
{
   struct attributes 
	{
	   string slotname;
      long flag;
	   string value;
		string state; 
	};

	typedef sequence <attributes> attributes_seq;

	oneway void update (in attributes_seq as);
};


And the following code for initializing and sending the Message:

CORBAMSG_ValueDef::attributes_seq_var asv;            // in a
Header-File Class CorbaWrapper
asv = new CORBAMSG_ValueDef::attributes_seq;          // in the
Constructur of the C++-File of CorbaWrapper (I have also tried the
max-len
                                                      // constructor,
but it doesn't work, too.)

asv->length(5);                                       // In a method
"eingabe" that is input of CorbaWrapper
	
asv[0].slotname  = (const char*) "Slotname";          // I have even
tried CORBA::string_dup("Slotname");
asv[0].flag      = 120L;
asv[0].value     = (const char*) "Value";
asv[0].state     = (const char*) "State";


I got a valid Object-Reference, at least CORBA::is_nil(ref) gives back
true.

As soon as I use ref->update(asv) though I get a segmentation fault -
core dump.

This only happens when asv->length isn't set to 1. As long as it is set
to 1 it works fine.

I would appreciate any help since I am getting crazy about this.

Kind regards,

Joerg