[zeromq-dev] Assertion failed: !(msg_->flags () & msg_t::more)(session_base.cpp:157)
rohanb at cs.uchicago.edu
Mon Sep 24 20:47:00 CEST 2012
Ian Barber <ian.barber <at> gmail.com> writes:
> On Mon, Sep 24, 2012 at 3:07 PM, RohanB <rohanb <at> cs.uchicago.edu> wrote:
> > the entire thing
> > happens before any package exchange takes place. What I mean is there is no
> > publisher running when I bring up the subscriber on the failing box. Even
> > its aborts with the assertion. You see what I mean?
> Ah, that's interesting. Could you post up a code sample of a
> stand-along subscriber that works on one box and not the other?
> > I am pretty certain I need some configuration on the failing box that the
> > box has and I just can't figure out what. Could you give me some info on the
> > earlier issue you mentioned and what the assert means?
> It's just attempting to pick the identity out of the message iirc,
> which potentially means ZMQ is receiving message data when it
> shouldn't be - certainly if no one has actually started sending!
ahh.. I see what you mean. Here's the snippet.... Pretty straightforward...
Same code works on 1 box and not the other..... Both boxes are enabled to
receive data on that multicast address and there is no other publisher currently
int main (int argc, char* argv)
if (argc < 2)
std::cout << "\nUsage: pgm_sub [topic_name]\n(for wildcard: pgm_sub
all)\n" << std::endl;;
zmq::context_t context (1);
zmq::socket_t subscriber(context, ZMQ_SUB);
const char* topic = strcmp(argv, "all") == 0 ? "\x00" : argv;
subscriber.setsockopt(ZMQ_SUBSCRIBE, topic, strlen(topic));
int rate = 10000;
subscriber.setsockopt(ZMQ_RATE, &rate, sizeof(rate));
char* msg_buffer = reinterpret_cast<char*>(update.data());
More information about the zeromq-dev