Boost C++ Libraries: Ticket #12232: boost::interprocess::intermodule_singleton initialization failed in Windows 2012 Server https://svn.boost.org/trac10/ticket/12232 <p> Hi, </p> <p> I've got the following exception from Boost Interprocess using Windows 2012 Server: "boost::interprocess::intermodule_singleton initialization". </p> <p> I've tried to fix it removing <a class="missing wiki">SharedMemory</a> and Shared variables previously created, but it doesn't work. The only solution for it is restarting the server. </p> <p> The expcetion happens using this code: </p> <p> <em>Removing previously created </em></p> <p> boost::interprocess::named_mutex::remove("TEST.SHARED.MEMORY0000002.MTX1.0.000000000000000000000000009"); if (mtx1 != nullptr) { </p> <blockquote> <p> delete mtx1; mtx1 = nullptr; </p> </blockquote> <p> } </p> <p> boost::interprocess::named_condition::remove("TEST.SHARED.MEMORY0000004.NMC1.0.000000000000000000000000050")); if (condition1 != nullptr) { </p> <blockquote> <p> delete condition1; condition1 = nullptr; </p> </blockquote> <p> } </p> <p> boost::interprocess::shared_memory_object::remove("TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021"); if (shmObj1 != nullptr) { </p> <blockquote> <p> delete shmObj1; shmObj1 = nullptr; </p> </blockquote> <p> } </p> <p> <em>Creating <a class="missing wiki">SharedMemory</a> boost::interprocess::permissions shared_memory_Perm; shared_memory_Perm.set_unrestricted(); boost::interprocess::managed_shared_memory shmObj1 = new boost::interprocess::managed_shared_memory </em></p> <blockquote> <p> (boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021", 42768, static_cast&lt;const void*&gt;(NULL), shared_memory_Perm ); </p> </blockquote> <p> boost::interprocess::named_mutex* mtx1 = new boost::interprocess::named_mutex(boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000002.MTX1.0.000000000000000000000000009"); boost::interprocess::named_condition* condition1 = new boost::interprocess::named_condition(boost::interprocess::create_only_t(), "TEST.SHARED.MEMORY0000004.NMC1.0.000000000000000000000000050"); </p> <p> Please, I need some help to fix this problem. Is there any solution without restaring the server for it? </p> <p> Thanks! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12232 Trac 1.4.3 anonymous Mon, 30 May 2016 18:17:46 GMT <link>https://svn.boost.org/trac10/ticket/12232#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12232#comment:1</guid> <description> <p> This problem occurs sometimes and it is very hard to reproduce, but when happens the only solution, that I've found, is restarting the server (reboot). </p> </description> <category>Ticket</category> </item> <item> <author>sergii.zaiets@…</author> <pubDate>Wed, 28 Sep 2016 11:01:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12232#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12232#comment:2</guid> <description> <p> There is a reason and a workaround: </p> <p> <a class="ext-link" href="http://stackoverflow.com/questions/38045857/boostinterprocess-exception-library-error-exception-when-creating-shared-mem"><span class="icon">​</span>http://stackoverflow.com/questions/38045857/boostinterprocess-exception-library-error-exception-when-creating-shared-mem</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>