Boost logo

Boost :

Subject: Re: [boost] boost::log access violation with global objects destructors
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-05-28 15:19:49

On 05/28/2010 09:35 PM, Philippe Vaucher wrote:
> Hello,
> Boost.Log creates an access violation when global objects being destructed
> attemps to log something.
> The doc says that I have to keep a shared_ptr to the core, but even doing so
> doesn't seem to work.
> I created a simple testcase here:

It doesn't crash on my Ubuntu. I'll try Windows tomorrow.

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at