Discussion:
[omniORB] bug in nil object reference in any?
renej
2007-02-28 20:04:38 UTC
Permalink
the following code fails:

#include <iostream>
#include <omniORB4/CORBA.h>
using namespace std;
int main() {
CORBA::Any any;
any <<= CORBA::Object::_nil();
cout << "kind: " << any.type()->kind() << endl;
CORBA::Object_ptr objPtr;
any >>= objPtr;

cdrStream *cdr = new cdrMemoryStream();
any >>= *cdr;

return 0; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070228/8a50dc71/attachment.htm
renej
2007-02-28 20:06:05 UTC
Permalink
tab+enter... problem in gmail...
anyway, the shown code results in:

kind: 14
omniORB: Assertion failed. This indicates a bug in the application
using omniORB, or maybe in omniORB itself.
file: any.cc
line: 381
info: kind == CORBA::tk_void || kind == CORBA::tk_null
terminate called after throwing an instance of 'omniORB::fatalException'
Aborted

but using a nil object reference in an any is allowed isn't it?
Post by renej
#include <iostream>
#include <omniORB4/CORBA.h>
using namespace std;
int main() {
CORBA::Any any;
any <<= CORBA::Object::_nil();
cout << "kind: " << any.type()->kind() << endl;
CORBA::Object_ptr objPtr;
any >>= objPtr;
cdrStream *cdr = new cdrMemoryStream();
any >>= *cdr;
return 0; }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070228/418b634c/attachment.htm
Duncan Grisby
2007-03-01 17:19:48 UTC
Permalink
Post by renej
kind: 14
omniORB: Assertion failed. This indicates a bug in the application
using omniORB, or maybe in omniORB itself.
file: any.cc
line: 381
info: kind == CORBA::tk_void || kind == CORBA::tk_null
terminate called after throwing an instance of 'omniORB::fatalException'
Aborted
but using a nil object reference in an any is allowed isn't it?
It's a bug. I've fixed it in CVS.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Continue reading on narkive:
Search results for '[omniORB] bug in nil object reference in any?' (Questions and Answers)
5
replies
Is gravity higher or lower on a mountaintop?
started 2013-05-08 17:45:51 UTC
physics
Loading...