[interprocess] error sending message
Hi all, I've got a problem using boost::interprocess::memory_queue on Windows - when trying to call send(), I get a null pointer returned by free_msg. This is because there is an offset_ptr with an offset of 1 at the requested location, causing null to be returned. An exception is then thrown with the message "boost::interprocess::message_queue corrupted". Here is a brief summary of my two applications: Application 1: - a Windows service - creates two message queues, messagesToApplication and messagesToService - creates a thread that waits for messages in messagesToService Application 2: - a Windows application - opens the two message queues, with open_only. - tries to send a message to Application 1, the Windows service after it opens the message queues. Everything works right up until application 2 tries to send a message via messagesToService. I haven't yet been able to identify why the offset_ptr has an offset of 1. If anybody has any suggestions as to what I might be doing wrong, I'd very much appreciate it! Thanks, Ian
El 08/10/2012 5:06, Ian Esten escribió:
Application 1: - a Windows service - creates two message queues, messagesToApplication and messagesToService - creates a thread that waits for messages in messagesToService
It's hard to have any clue with so little details. Message queue ABI is about to change in soon to be released Boost 1.52, maybe this issue is already fixed. Ion
Found the problem. Application 2 is a plug-in. After the plug-in binary is loaded, the host calls into the plug-in to query for available functionality. So, it's after static init, but something about trying to open the message queues from that call was the problem. Moving it fixed the issue. On Mon, Oct 8, 2012 at 1:07 PM, Ion Gaztañaga <igaztanaga@gmail.com> wrote:
El 08/10/2012 5:06, Ian Esten escribió:
Application 1: - a Windows service - creates two message queues, messagesToApplication and messagesToService - creates a thread that waits for messages in messagesToService
It's hard to have any clue with so little details. Message queue ABI is about to change in soon to be released Boost 1.52, maybe this issue is already fixed.
Ion ______________________________**_________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/**mailman/listinfo.cgi/boost-**users<http://lists.boost.org/mailman/listinfo.cgi/boost-users>
participants (2)
-
Ian Esten
-
Ion Gaztañaga