Hello,
 
We're seeing a strange occurance which I'm able to reproduce pretty
well.  We're running RHEL 4.0, with LOG4CXX 0.10.0.
 
 
The short version, is that we have objects, each with a LoggerPtr member
variable.  We init the ptr in the constructor, and are seeing occasional
seg faults when the application terminates.  (The application is
actually a boost automated unit test).
 
 
I've caught the segfault in DDD, and it is in Transcoder::encode, where
the static CharsetEncoder local variable ends up being set to null.
 
 
I haven't tracked down exactly *why* yet, but my gut tells me that it
has to do with the LOG4CXX subsystem being destroyed prior to all of the
class users being destroyed.
 
 
So, some questions:
 
    Is this a reasonable hypotheses?  I obviously have some more
tracking down to do, but I will not be able to provide any core dump
unfortunately.
 
    Is it a bad idea to log messages in a class destructor?
 
    Any suggestions to prevent this segfault from occuring?
 
 
Thanks
 
--dw

Reply via email to