Hi,

If my program links to two different version of xerces ( I use xerces in
my program and I have a dependency on another third-party component
which needs xerces too. ) In my main() method I call
XMLPlatformUtils::Initialize() and at the end I call
XMLPlatformUtils::Terminate(). The third party component is initialized
and terminated inbetwenn these two calls.

On shutdown of my application I get a core dump, I get the following on
analysis of the core file :

detected a multithreaded program
[EMAIL PROTECTED] ([EMAIL PROTECTED]) program terminated by signal SEGV (no mapping at 
the fault
address)
0xfe7954f0: size+0x0004:        ld      [%o0 + 0x4], %o0
(dbx) where
current thread: [EMAIL PROTECTED]
=>[1] RefVectorOf<XMLDeleter>::size(0x0, 0x4d588, 0x5f, 0xfde279d0,
0xfe708228, 0x5), at 0xfe7954f0
  [2] XMLPlatformUtils::cleanupLazyData(0x470, 0xfe7ba5ac, 0xfe7e28e8,
0xfde275a4, 0xfde14c28, 0x1), at 0xfe76d040
  [3] XMLPlatformUtils::Terminate(0xec0, 0xfe7ba5ac, 0x309ec,
0xfe53a000, 0x40874, 0x1), at 0xfe76ced4
  [4] mpi_fini_mercpi(0xfde74ff0, 0x3, 0x2cee4, 0xfde28bdc, 0x40874,
0xfdaea20c), at 0xfde2d130
  [5] CMpi::~CMpi(0xfde77054, 0x2, 0x2ce9c, 0xff3f66c4, 0xfe85e6a8,
0x0), at 0xfde28be4
  [6] _fini(0x0, 0x0, 0xfeb211e0, 0xf, 0x70, 0x1c), at 0xfde5d690
  [7] call_fini(0xff3f6160, 0xff3f615c, 0xff3f66c4, 0xff3f7c40,
0xffffffff, 0x0), at 0xff3cc260
  [8] atexit_fini(0xfe53fe24, 0x0, 0x2096c, 0xfe49c4ec, 0xfe4885d0,
0x5), at 0xff3cc440
  [9] _exithandle(0x381d4, 0x2, 0xfe7ba5ac, 0x41cf80, 0x41cfa0,
0xfe53a000), at 0xfe49c4ec
  [10] exit(0x0, 0xffbfe8ec, 0xffbfe8fc, 0x3bc800, 0x0, 0x0), at
0xfe51d370
(dbx) quit


When I remove the XMLPlatformUtils::Terminate() at the end of my main
method, I do not get the core dump.
XMLPlatformUtils::Terminate() should ideally be called only once, looks
like the third party component also calls
XMLPlatformUtils::Terminate(). The second XMLPlatformUtils::Terminate()
causes the core dump as it is trying
to cleanup data which has been cleaned up already.

Is there a way to determine in Xerces 1.2 if
XMLPlatformUtils::Terminate() has already been called ?
Is my understandinbg correct, if so what is the graceful way of taking
care of this ?

Thanks,
Nikita



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to