I am writing real time data to boost shared memory. Initially I was using this every time I want to access the shm:
boost::interprocess::managed_shared_memory segment(boost::interprocess::open_or_create, "MySharedMemory",20000000);
On debug mode I found out that this call always throws this exception:
First-chance exception at 0x00007FFA30BB95FC in testerud.exe: Microsoft C++ exception: boost::interprocess::interprocess_exception at memory location 0x000000000550E1C0.
But I was able to open and push my data to shared memory. I found a turn around to this problem. I created another function just to open_or create at the start of the process and then used open_only to write every time. There was no exception.
I am curious about the reason behind this.