Boost logo

Boost :

Subject: Re: [boost] boost::log access violation with global objects destructors
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2010-05-28 19:04:57


> Considering the code snippet, the core is sure to be intact. But it's just
> one of the requirements to be able to write logs in global destructors.
> There are other things required, such as the logger. I would recommend to
> store the logger in the global object to guarantee that. However, as far as
> I can see your particular code snippet should be fine in this regard.
> Strange.

Here is a little more information: this happens with VC++ express 2008. It
originally happend with a severity_logger_mt when Qt issued a qWarning()
after main() returned from within a destructor and I wanted to log that
warning. The access violation was within some mutex/lock code from
boost::thread, but I also saw it fail in boost::intrusive or other libs
boost::log was using depending on how I moved code around. I'll try to
provide a trace on monday.

Philippe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk