Re: [orbitcpp-list] A possible bug?
Status: Beta
Brought to you by:
philipd
From: Phil D. <ph...@us...> - 2001-04-07 10:17:33
|
Hi Jiva, In fact this code shouldn't work anyway, since you are using an _var type to hold the orb, which is a smartpointer and will release the old orb ref when reassigned to. This means that in your example the orb ref is released twice. The problem is that this code still segfaults if a CORBA::ORB_ptr is used, and that is most likely an orbit bug somewhere. I'll check this out. Cheers, Phil Jiva DeVoe writes: > The following code causes a segfault on the second one. Why? > > CORBA::ORB_var orb; > cout << "1" << endl; > orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); > CORBA::release(orb); > cout << "1" << endl; > orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); > CORBA::release(orb); > cout << "1" << endl; > orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); > CORBA::release(orb); > cout << "1" << endl; > orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); > CORBA::release(orb); > cout << "1" << endl; > orb = CORBA::ORB_init(argc, argv, "orbit-local-orb"); > CORBA::release(orb); > > Some folks wouldn't do this, but we have unit tests that need to setup > and tear down a corba connection for serveral consecutive tests. This > crashes my code. > -- > > _______________________________________________ > orbitcpp-list mailing list > orb...@li... > http://lists.sourceforge.net/lists/listinfo/orbitcpp-list |