Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] io_service use in dll leads to service_registry crash
From: Igor R (boost.lists_at_[hidden])
Date: 2009-02-18 03:54:09


>
>
>
> I've attached a zip of the Visual Studio 2008 solution and project files
> that reproduces the issue. The bin folder contains the compiled executable
> as well, if for some reason this is useful.
>

I built and run your code. It really crashes if you forcibly unload the dll
but it does *not* crash if I comment-out this line *or* if I remove acceptor
object from the dll code. It seems that the reason of the crash is that a
dll statically linked to CRT has its own private CRT (including memmoty
management), so when you free the dll, all the asio objects created from
within the dll (asio services in this case) become inaccessible.
Try and build asio, dll and the host app with dynamic CRT - probably this
will help.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net