[omniORB] Problem with sequences

Sai-Lai Lo S.Lo@uk.research.att.com
19 May 1999 11:03:40 +0100


>>>>> Cristi  writes:

> ===============================

> One of the methods of the object is (it's just for trying that it works):

> ===================================

> CORBA::Long  UserAdminLocalServer_i::ListaCompletaUtilizatori(utilizatorVect
> *& utl_list) {
>  utilizatorVect* temp = new utilizatorVect();
temp-> length(1);
>  (*temp)[0].cont = CORBA::string_dup((const char*)"frana");
>  (*temp)[0].parola = CORBA::string_dup((const char*)"aaa");
>  (*temp)[0].nume = CORBA::string_dup((const char*)"frana");
>  (*temp)[0].prenume = CORBA::string_dup((const char*)"ioan");
>  (*temp)[0].adresa = CORBA::string_dup((const char*)"xxx");
>  (*temp)[0].telefon = CORBA::string_dup((const char*)"1234");
>  (*temp)[0].email = CORBA::string_dup((const char*)"frana@xxx");
>  (*temp)[0].uID = (CORBA::Long)2;
>  (*temp)[0].activ = (CORBA::Short)1;
>  utl_list = temp;
>  delete temp;
   ^^^^^^^^^^^^^^^^^^

Wrong! Cannot delete the out argument. The ORB will call delete once
it has marshalled the argument.


> Could you tell me why the client crashes with a "Debug assertion failed"
> (Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)) when I call

Are you sure this is the client? It looks to me it is the server that is
crashing when the ORB try to delete the out argument.

Sai-Lai


-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND