Re: Orbacus problem

Darren Middleman <[email protected]> Tue, 29 Mar 2005 20:45:35 -0330
Newsgroups gmane.comp.corba.orbacus
Organization IONA | Making Software Work Together TM
Message-ID <[email protected]>
Hi Kleva,

On Tue, Mar 29, 2005 at 05:51:34PM +0400, kleva wrote:
> Hi,
>  I have a question abour ORBacus, maybe you can help me?
> 
>  I've "start from helloclient.cpp", so my code in run function is:
> 
>  
>     CORBA::Object_var obj;
> 
>     try
>     {obj  = orb -> 
>  string_to_object("corbaloc::127.0.0.1:19740/ORB/OA/IDL:SuiteManager:1.0");}
>     catch(const CORBA::BAD_PARAM&)  {}
> 
>     if(CORBA::is_nil(obj))
>     { cerr << argv[0] << ": cannot read IOR from Hello.ref" << endl;  
>  return EXIT_FAILURE; }
>     
>     SuiteManager_ptr sm = SuiteManager::_narrow(obj);
>     assert(!CORBA::is_nil(sm));
> 
>     int fm = sm->getFreeMemory();
>     cout << "freemem:" << fm << "\n";
> 
>     return EXIT_SUCCESS;
>  
> The error occures in line sm->getFreeMemory();
> I run my program with TCP sniffer and first GIOP request
> succeds(SuiteManager_ptr sm = SuiteManager::_narrow(obj);)
> 
> But second even not sending via TCP. It meant, tha error occures
> before it should be send.
> 
> Firs rune-time error occures in malloc.c:
> on line: return HeapAlloc(_crtheap, 0, size);
> Unhandled exception at 0x793aa4e1 in NokiaHello.exe: Microsoft C++ exception: __non_rtti_object @ 0x0012fb64.
> 
> 
> then if I choose continue the error occures in client.c:
> on line: OBStubImpl_imletmanager::SuiteManager_ptr _ob_stubImpl = dynamic_cast< OBStubImpl_imletmanager::SuiteManager_ptr>(_ob_stubImplBase.in());
> Unhandled exception at 0x7c35a371 (msvcr71.dll) in NokiaHello.exe: 0xC0000005: Access violation reading location 0x00000004.
> 
> What you suggest me to do?
> Should I send complete myidl.idl, myidl.cpp and myidl.h?
>     
> Best regards,
>  kleva                            mailto:[email protected]

Please CC [email protected] so that you address the whole team and
community.  This will help ensure an answer in the event that I become 
unavailable.

I really can't tell what is happening here with the code segment you have
sent.  You mention that the error is occurring in the sm->getFreeMemory()
call.  Can you provide the code that gets executed in this call?  It might
also be helpful to have the complete myidl.* files as you suggest.

Regards,
Darren

-- 
Darren Middleman, Software Engineer
Team Orbacus - Your CORBA Source
Email: mailto:[email protected]
WWW: http://www.orbacus.com/
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html