[nanomsg] Simple PUB/SUB crashing

  • From: Gerry Steele <gerry.steele@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Sun, 15 Jun 2014 13:19:47 +0100

I'm trying get a hello world type PUB/SUB example working using the example
provided but it simply core dumps on me on receiving messages and I'm a bit
of a dead end. Any ideas would be welcome.

nm_sub.cpp here: https://gist.github.com/easytiger/f7316f2c7700f9a6a424
nm_pub.cpp here: https://gist.github.com/easytiger/a508ee5d0714c64407af

Core is:

(gdb) bt full
#0  0x00007ffff7bb43d1 in nn_recvmsg (s=<optimized out>,
msghdr=msghdr@entry=0x7fffffffe4e0,
flags=<optimized out>) at src/core/global.c:806
        rc = 0
        msg = {hdr = {ref = '\000' <repeats 24 times>, "?|???\177\000"},
body = {ref = "\000\000\000\000\000\000\000\000
\021\000??\177\000\000\000\000\000\000\000\000\000\000\025\005???\177\000"}}
        data = <optimized out>
        sz = <optimized out>
        i = <optimized out>
        iov = <optimized out>
        chunk = 0x7fffe8001120
#1  0x00007ffff7bb44db in nn_recv (s=<optimized out>, buf=<optimized out>,
len=<optimized out>, flags=<optimized out>) at src/core/global.c:671
        iov = {iov_base = 0x0, iov_len = 18446744073709551615}
        hdr = {msg_iov = 0x7fffffffe4d0, msg_iovlen = 1, msg_control = 0x0,
msg_controllen = 0}
#2  0x0000000000400dde in main ()

Many Thanks
g

-- 
Gerry Steele

Other related posts: