[omniORB] chrash with MSC++5.0
barbara.mathae@sdm.de
barbara.mathae@sdm.de
Tue, 14 Dec 1999 19:05:00 +0100
Here is the message without the zip file. I hope the listet parts of =
the
source code are enough to get a notion of the problem!
Barbara
> ----------
> From: Math=E4, Barbara
> Sent: Tuesday, December 14, 1999 4:59 PM
> To: 'omniorb-list@uk.research.att.com'
> Subject: chrash with MSC++5.0=20
>=20
> Hello Omniorber's:
>=20
> I run omniorb (2.8) on Windows Nt40. I am using Visual Studio C++ =
5.0. I
> can establish a connection and send data from one side to the other =
and
> vice versa. But when trying to send the following data (see also the
> attached zip file) a crash occurs. HEAP[try50.exe]: Invalid Address
> specified to RtlValidateHeap
> the crash occurs in:
>=20
> operator delete(void * 0x00a07b60) line 49 + 16 bytes
> _CORBA_String_member::~_CORBA_String_member()=20
>=20
> as I can see from the call stack.=20
>=20
> // the idl file
> oneway void putResult(in ImageDecodingResult result);
>=20
> struct ImageDecodingResult {
> ImageId id;
> DecodingResult result;
> };
>=20
> const long IMAGEIDSIZE =3D 32;=20
> typedef sequence <octet, IMAGEIDSIZE> ImageId;
>=20
> struct DecodingResult {
> CodingDepth curCodingDepth;
> unsigned long rejectReason;
> unsigned long confLevelDc;
> DistribCode dc;
> unsigned long addInfo;
> AddrElementList elements;
> };
>=20
> struct AddrElement {
> ElementType type;
> unsigned long confLevelNominal;
> unsigned long confLevelReference;
> string<63> nominalElement;
> string<63> referenceElement;
> };
>=20
> typedef sequence<AddrElement> AddrElementList;
>=20
> enum CodingDepth { UnknownCodingDepth,=09
> NoCodDepth, =09
> AoiCodDepth, =09
> OutwardCodDepth,=09
> InwardCodDepth,=09
> SequencingCodDepth=09
> };
>=20
> //
>=20
> // a part of the source Code:
>=20
> Imm_var myImm =3D Imm::_narrow(obj);
> =20
> ImageDecodingResult *vdecodingResult =3D new =
ImageDecodingResult();
> // Struktur aufbauen
> vdecodingResult->id.length(1);=20
> vdecodingResult->id[0] =3D 1;
> vdecodingResult->result.curCodingDepth =3D UnknownCodingDepth;
> vdecodingResult->result.rejectReason =3D 0;
> vdecodingResult->result.confLevelDc =3D 0;
> vdecodingResult->result.dc =3D strdup("Test");
> vdecodingResult->result.addInfo =3D 0;
> vdecodingResult->result.elements.length(1);
> vdecodingResult->result.elements[0].type =3D CountryElement;
> vdecodingResult->result.elements[0].confLevelNominal =3D 1;
> vdecodingResult->result.elements[0].confLevelReference =3D 2;
> vdecodingResult->result.elements[0].nominalElement =3D =
strdup("Addr");
> vdecodingResult->result.elements[0].referenceElement =3D =
strdup("Hallo");
> =20
> myImm->putResult( *vdecodingResult );=20
> // =20
>=20
> I have no idea why this happens. I also used the CORBA::string_dup =
for
> copying strings, but the same crash occurs.=20
> I tried the use of CORBA::string_dup standalone. I can transfer a =
string
> only when using strdup instead of CORBA::string_dup!
>=20
> In the attachement you will find the idls and the source code (as a =
zip
> file). =20
> The object implementation you will find in the folder gegenpart. This =
is
> only a quick "hack" to test the transfer of the data I have =
difficulties
> with.=20
>=20
> I am using CORBA for the first time, therefore I am not sure whether =
the
> C++ binding I used is ok. Thank you for every comment or advice in =
this
> case.=20
>=20
> Barbara=20
>=20