You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by chris schaefer <ch...@seacoms.com> on 2000/12/13 02:29:28 UTC

exception problem

Hello:
   In my code I to create, delete and then recreate  a class which uses
Xerces.  ( there is only ever ONE instance at a time )
I'm running into an exception thrown on the second usage of the class:

(gdb) backtrace
#0  XMLException::loadExceptText (this=0xbffff240, toLoad=Mutex_CouldNotLock)
    at XMLException.cpp:249
#1  0x400f9b26 in XMLPlatformUtilsException::XMLPlatformUtilsException (
    this=0xbffff240, srcFile=0x40126700 "LinuxPlatformUtils.cpp", srcLine=629,

    toThrow=Mutex_CouldNotLock)
    at /usr/local/xerces-c/include/util/PlatformUtils.hpp:582
#2  0x400b403b in XMLPlatformUtils::lockMutex (mtxHandle=0x808c9d0)
    at LinuxPlatformUtils.cpp:629
#3  0x400b4f9c in XMLMutex::lock (this=0x808c9c0) at Mutexes.cpp:117
#4  0x400b4ff1 in XMLMutexLock::XMLMutexLock (this=0xbffff300,
toLock=0x808c9c0)
    at Mutexes.cpp:134
#5  0x400e5ec0 in XMLScanner::commonInit (this=0x80cf330) at
XMLScanner.cpp:784
#6  0x400e3e16 in XMLScanner::XMLScanner (this=0x80cf330, validator=0x8082ea0)

    at XMLScanner.cpp:161
#7  0x4009431a in DOMParser::DOMParser (this=0x8082e50, valToAdopt=0x0)
    at DOMParser.cpp:123
#8  0x805872d in ConfigManager::ConfigManager (this=0x8081be0) at
ConfigManager.C:108
#9  0x8058332 in main () at looper.C:10
#10 0x401eaa7c in __libc_start_main (main=0x805829c <main>, argc=1,
    ubp_av=0xbffff7f4, init=0x805759c <_init>, fini=0x80760e0 <_fini>,
    rtld_fini=0x4000d684 <_dl_fini>, stack_end=0xbffff7ec)
    at ../sysdeps/generic/libc-start.c:111


My constructor/destructor has the  XMLPlatformUtils::Initialize(); and
XMLPlatformUtils::Terminate();  calls.

Obiously there is some problem with a mutex here.  Does anyone have ANY idea
what this might be about?  I suspect
that I'm doing something wrong, but I have no idea what.   For reference this
is 1_3_0 running on RH7.0 linux.

The last line of my code ConfigManager.C:108   is:
pDOMparser = new DOMParser;

Since I'm expecting xerces to do it's garbage collecting thing, I never delete
this parser, even on reuse of the pointer, and
not in the detructor either.  is that correct?


-C-