[zeromq-dev] problem running two 0mq applications on one host side-by-side

Pieter Hintjens pieterh at gmail.com
Mon Apr 16 18:17:56 CEST 2012

Awesome...I'll add some explanation about this to the Guide.
On Apr 16, 2012 9:07 AM, "Chris Dinn" <cdinn at mdialog.com> wrote:

> > The main cause (actually the only one I know) for corrupted messages
> > is when you send from a buffer (using zmq_msg_init_data) and then free
> > or reuse the buffer. Since data isn't copied, if the original buffer
> > isn't valid when the message actually gets sent (at some later point
> > by the I/O thread), it'll send garbage.
> Thanks for the tip Pieter, looks like you were exactly right. It appears
> that the Scala binding is using JNA to allocate a buffer for
> zmq_msg_init_data, but doing nothing to ensure that the buffer is still
> valid at the time the message is actually sent.
> https://github.com/kro/zeromq-scala-binding/blob/master/src/main/java/org/zeromq/ZMQ.java#L434
> I'm working on a fix now. Thanks again.
> --Chris
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120416/5339eeb6/attachment.htm>

More information about the zeromq-dev mailing list