[omniORB] My program crashes when I try to dereference an object
from a sequence
Lane, Frank L
frank.l.lane at boeing.com
Mon Oct 27 16:30:10 GMT 2008
Hi,
My program is crashing and I don't understand why, will someone please
tell me what I'm doing wrong?
Visual Studio 2008, XP, OmniORB 4.1.3
I printed out the addresses and the address of the sequence element is
the same as that of the CORBA object just created. Whenever I try to
use the sequence element my program crashes. BTW, here's what the screen
says followed by the relevant code listing.
<BEGIN SCREEN OUTPUT>
C:\Personal\Examples\ch5n6Home>sharedServer.exe
IOR:010000001800000049444c3a506f7274666f6c696f42726f6b65723a312e30000100
00000000
000064000000010102000e0000003133302e3132322e34322e35360028080e000000fe3d
32064900
000ba4000000000000000200000000000000080000000100000000545441010000001c00
00000100
0000010001000100000001000105090101000100000009010100
Upcall with name: a, account: 7
Trying to find: 7
Size: 0
Creating new customer, name: a, account: 7
New customer created, a, 7
_Customers[0]: 0036F738
TheCustomer: 0036F738
TheCustomer data, a, 7
omniORB: Assertion failed. This indicates a bug in the application
using omniORB, or maybe in omniORB itself.
file: current.cc
line: 141
info: !pd_callDescriptor
<END SCREEN OUTPUT>
<BEGIN SERVANT LISTING>
Customer_ptr
PortfolioBroker_impl::MakeCustomer
(const char * CustomerName, const char * CustomerAccount)
{
cout << "Upcall with name: " << CustomerName
<< ", account: " << CustomerAccount << endl;
Customer_var dup = FindCustomer (CustomerAccount);
if (!CORBA::is_nil(dup)) {
cout << "Bombing out" << endl;
throw PortfolioBroker::DuplicateCustomer (dup->Name());
}
else {
cout << "Creating new customer"
", name: " << CustomerName << ", account: " << CustomerAccount
<< endl;
}
Customer_impl * TheCustomer
= new Customer_impl (CustomerName, CustomerAccount);
cout << "New customer created, " << TheCustomer->Name()
<< ", " << TheCustomer->Account() << endl;
CORBA::Long size = _Customers.length();
_Customers.length(size+1);
_Customers[size] = (Customer_ptr)TheCustomer;
if (CORBA::is_nil(_Customers[0]))
cout << "The newly created seq member is nil?" << endl;
else {
cout << "_Customers[0]: " << _Customers[0] << endl;
cout << "TheCustomer: " << TheCustomer << endl;
cout << "TheCustomer data, " << TheCustomer->Name()
<< ", " << TheCustomer->Account() << endl;
!!!!! ----- Here is where it is crashing -----!!!!!!
!!!!! ----- The instant I try to get data back out of the sequence it
crashes ----- !!!!!!!
Customer_var temp = (Customer_ptr)_Customers[0];
cout << "The sequence data, " << temp->Name()
<< ", " << (*temp).Account() << endl;
//cout << "New customer created, " << _Customers[0]->Name() <<
endl;
}
return Customer::_duplicate((Customer_ptr)TheCustomer);
}// end MakeCustomer ()
<END SERVANT LISTING>
Any help will be greatly appreciated!
Thanks,
Frank
More information about the omniORB-list
mailing list