[omniORB] CORBA::Any::NP_marshalDataOnly assertion failure

Peter S. Housel housel at acm.org
Tue Nov 20 23:08:24 GMT 2007


The following test program seems like it ought to work, but (in the
current CVS omni4_1_develop sources) fails with an assertion failure:

#include <omniORB4/CORBA.h>

int main(int argc, char *argv[]) {
  CORBA::Any a;
  a <<= CORBA::Object::_nil();
  cdrMemoryStream s;
  a.NP_marshalDataOnly(s);

  return 0;
}

The assertion failure is:

omniORB: Assertion failed.  This indicates a bug in the application
using omniORB, or maybe in omniORB itself.

file: /home/housel/sourceforge/omniorb/omni/src/lib/omniORB/dynamic/any.cc
 line: 433
 info: kind == CORBA::tk_void || kind == CORBA::tk_null
terminate called after throwing an instance of 'omniORB::fatalException'
Abort (core dumped)

The code in NP_marshalDataOnly seems to be asserting that only tk_null
and tk_void should be without a pd_data or pd_mbuf field, but this seems
to also be the case for nil object references.

(In my real code, CORBA::Any::NP_marshalDataOnly() is being called from
within RequestImpl::marshalArgs().)

-- 
Peter S. Housel <housel at acm.org>



More information about the omniORB-list mailing list