[omniORB] NT runtime initialization error on omniORB3

Terry A. Lee terryl@wt.net
Tue, 1 Feb 2000 15:03:16 -0600


As background, since version 280 I have had to link omniDynamic DLL even
though I don't use any in my source or use the -A or -a when compiling
the idl. If I do not link with omniDynamic I have the following
3 undefines:

"public: __thiscall CORBA::TypeCode_member::~TypeCode_member(void)"
"public: __thiscall CORBA::Any::~Any(void)"
"public: static void __cdecl CORBA::IDLType_Helper::release(class
CORBA::_objref_IDLType *)"

This is not a particular problem in omniORB2 but with omniORB3 on
NT the dynamic lib initialization gets in an infinite loop and finally
does a Memory Access Violation (C0000005) during initialization in the
following code of dynamicLib.cc

// Static constructor to initialise omniDynamicLib::hook.
struct omniDynamicLib_initialiser {
  inline omniDynamicLib_initialiser() {
    omniDynamicLib::hook = &dynamic_ops;
  }
  static omniDynamicLib_initialiser instance;
};
omniDynamicLib_initialiser omniDynamicLib_initialiser::instance;

In the debugger I can see several thousand nested "instance"
that is, instance->instance->instance...

To temporarily get around it I had to comment out the following line
in src/lib/omniORB2/dynamic/dynamicLib.cc:

//omniDynamicLib_initialiser omniDynamicLib_initialiser::instance;

This seems to be NT specific I don't have the same problem on
Sparc Solaris. The compiler is MS Visual C++ Version 5.0 with
Visual 97 service pack 3 applied.


Terry Lee
Paradigm Geophysical