[Boost-bugs] [Boost C++ Libraries] #12232: boost::interprocess::intermodule_singleton initialization failed in Windows 2012 Server

Subject: [Boost-bugs] [Boost C++ Libraries] #12232: boost::interprocess::intermodule_singleton initialization failed in Windows 2012 Server
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-28 00:57:40


#12232: boost::interprocess::intermodule_singleton initialization failed in Windows
2012 Server
-------------------------------+--------------------------
 Reporter: rafael.bronzeri@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: |
-------------------------------+--------------------------
 Hi,

 I've got the following exception from Boost Interprocess using Windows
 2012 Server:
 "boost::interprocess::intermodule_singleton initialization".

 I've tried to fix it removing SharedMemory and Shared variables previously
 created, but it doesn't work. The only solution for it is restarting the
 server.

 The expcetion happens using this code:

 //Removing previously created

 boost::interprocess::named_mutex::remove("TEST.SHARED.MEMORY0000002.MTX1.0.000000000000000000000000009");
 if (mtx1 != nullptr)
 {
         delete mtx1;
         mtx1 = nullptr;
 }

 boost::interprocess::named_condition::remove("TEST.SHARED.MEMORY0000004.NMC1.0.000000000000000000000000050"));
 if (condition1 != nullptr) {
                 delete condition1;
                 condition1 = nullptr;
 }

 boost::interprocess::shared_memory_object::remove("TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021");
 if (shmObj1 != nullptr)
 {
         delete shmObj1;
         shmObj1 = nullptr;
 }


 //Creating SharedMemory
 boost::interprocess::permissions shared_memory_Perm;
 shared_memory_Perm.set_unrestricted();

 boost::interprocess::managed_shared_memory shmObj1 = new
 boost::interprocess::managed_shared_memory
 (boost::interprocess::create_only_t(),
 "TEST.SHARED.MEMORY0000001.XXX.0.000000000000000000000000021", 42768,
                                         static_cast<const void*>(NULL),
 shared_memory_Perm );
 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");


 Please, I need some help to fix this problem.
 Is there any solution without restaring the server for it?


 Thanks!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12232>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC