[omniORB] omniORB4 devel, darwin, bus error on CORBA::Any??

Rainer Frohnhoefer rain_list@arcor.de
Wed Nov 6 19:23:01 2002


  Good evening,

  when I tried to run this little test program:

#include <iostream>
#include <omniORB4/CORBA.h>

using namespace std;

int main(int argc, char *argv[]) {
   try {
     	// Initialise the ORB.
     	CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
     	cout << "orb here." << endl;

	cout << "get an any." << endl;
	CORBA::Any a;

	const char* aStr = "Aloha!";
	cout << "insert " << aStr << " into any" << endl;
	a <<= aStr;
	cout << "done." << endl;
	
	cout << "Extract String from any. " << endl;
	const  char* aStr2;
	a >>= aStr2;
	cout << "Extracted: " << aStr2 << endl;
	
   } catch(CORBA::SystemException& e) {
   }
}


  MacOS X 10.2 dies with a

orb here.
get an any.
zsh: bus error  ./anytest


?!?

  A trace with tracelevel 25 doesn't reveal anything after the ORB 
initialization; a stack trace gives me this:

...
[Switching to process 9003 thread 0xb03]
Reading symbols for shared libraries ...... done
orb here.
get an any.

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x00a623c8 in 
omni::TypeCode_collector::duplicateRef(omni::TypeCode_base*) ()
(gdb) backtrace
#0  0x00a623c8 in 
omni::TypeCode_collector::duplicateRef(omni::TypeCode_base*) ()
#1  0x00a584a8 in omni::TypeCode_alias::TypeCode_alias(char const*, 
char const*, omni::TypeCode_base*) ()
#2  0x00a54840 in CORBA::TypeCode::PR_alias_tc(char const*, char 
const*, CORBA::TypeCode*) ()
#3  0x00ae8b08 in __static_initialization_and_destruction_0(int, int) ()
#4  0x8fe16350 in __dyld_call_module_initializers_for_library ()
#5  0x8fe160e4 in __dyld_call_module_initializers ()
#6  0x8fe106f0 in __dyld_link_in_need_modules ()
#7  0x8fe1016c in __dyld_bind_lazy_symbol_reference ()
#8  0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#9  0x00b12204 in omni::TypeCode_alignTable::setNumEntries(unsigned) ()
#10 0x00a55b10 in omni::TypeCode_base::TypeCode_base(CORBA::TCKind) ()
#11 0x00a649d0 in omni::check_static_data_is_initialised() ()
#12 0x00ae8250 in __static_initialization_and_destruction_0(int, int) ()
#13 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#14 0x8fe160e4 in __dyld_call_module_initializers ()
#15 0x8fe106f0 in __dyld_link_in_need_modules ()
#16 0x8fe1016c in __dyld_bind_lazy_symbol_reference ()
#17 0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#18 0x00a11408 in CORBA::Any::Any() ()
#19 0x00ae7f34 in __static_initialization_and_destruction_0(int, int) ()
#20 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#21 0x8fe160e4 in __dyld_call_module_initializers ()
#22 0x8fe106f0 in __dyld_link_in_need_modules ()
#23 0x8fe102d0 in __dyld_bind_lazy_symbol_reference ()
#24 0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#25 0x00ae662c in __static_initialization_and_destruction_0(int, int) ()
#26 0x8fe16350 in __dyld_call_module_initializers_for_library ()
#27 0x8fe160e4 in __dyld_call_module_initializers ()
#28 0x8fe106f0 in __dyld_link_in_need_modules ()
#29 0x8fe102d0 in __dyld_bind_lazy_symbol_reference ()
#30 0x8fe00ec0 in __dyld_stub_binding_helper_interface ()
#31 0x00002528 in main (argc=1, argv=0xbffff94c) at anytest.cc:13
#32 0x0000222c in _start (argc=1, argv=0xbffff94c, envp=0xbffff954) at 
/SourceCache/Csu/Csu-45/crt.c:267
#33 0x000020ac in start ()
(


  Any ideas?

Regards,
	-Rainer