[omniORB] Win32 Question

ryan.tecco rtecco@voxel.ummu.umich.edu
Thu, 3 Jun 1999 17:03:06 -0400 (EDT)


I did some debugging through my code and found that the assertion is being
generated in CORBA::Boolean _sk_MY::dispatch(...);

It appears to be returning a 1 and that is causing the assertion.

rt

--------------
ryan.tecco
734.647.8057
microcosm/CAVE programmer
the university of michigan
"when all the pettiness is gone,
what do we really have?"

On Thu, 3 Jun 1999, Charles Martin wrote:

> ryan.tecco wrote:
> > 
> > All right, here is a little snip of what I am doing. It is basically based
> > on the eg2_xxxx samples.
> > 
> > class MyObject : public virtual _sk_MY
> > {
> > public:
> >         MyObject();
> >         virtual ~MyObject();
> >         virtual char* request();
> > };
> > 
> > BOOL CMyDlg::OnInitDialog()
> > {
> >  ...
> >  int argc = 0;
> >  CORBA::ORB_ptr orb = CORBA::ORB_init(argc, NULL, "omniORB2");
> >  CORBA::BOA_ptr boa = orb->BOA_init(argc, NULL, "omniORB2_BOA");
> >  my_impl = new MyObject;
> >  my_impl->_obj_is_ready(boa);
> >  MY_var objRef = my_impl->_this();
> >  CORBA::String_var temp = orb->object_to_string(objRef);
> >  std::ofstream outFile("iiop.txt", ios::out);
> >  outFile << (char *)temp;
> >  outFile.close();
> >  boa->impl_is_ready(0, 1);
> >  ...
> > }
> > 
> > void CVoiceRecDlg::OnCancel()
> > {
> >         delete my_impl;
> >         CDialog::OnCancel();
> > }
> 
> If I recall, you should never delete a CORBA implementation object by calling
> 'delete' yourself. You should call 'my_impl->_dispose()' instead. This might
> be what is causing your errors. But, I might be wrong since I am also
> fairly new to ORBs....
> 
> - Charles
> 
> --
> Charles Martin           |  Discreet inc.
> charles@discreet.com     |  10, rue Duke
> (514) 954-7185           |  Montreal (Quebec), Canada, H3C 2L7
> http://www.discreet.com  |
>