discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: Why does this dump core?


From: Jim Melton
Subject: RE: Re: Why does this dump core?
Date: Wed, 15 Sep 2021 20:56:36 +0000

Simpler example. This still dumps core. Please explain what is wrong with the argument:

 

class Test : public gr::block

{

public:

Test();

};

 

Test::Test() : gr::block() {

message_port_register_out(pmt::mp("test"));

}

 

int main(int argc, char** argv)

{

Test test; // dumps core

Return 0;

}

 

---

Jim Melton

 

From: Jeff Long <willcode4@gmail.com>
Sent: Tuesday, September 14, 2021 14:10
To: Jim Melton <jim.melton@sncorp.com>
Cc: GNURadio Discussion List <discuss-gnuradio@gnu.org>
Subject: [EXTERNAL] Re: Why does this dump core?

 

gr::CyberRadio::vita_udp_rx_impl::vita_udp_rx_impl() is calling gr::basic_block::message_port_register_out() with a bad argument most likely.

 

On Tue, Sep 14, 2021 at 2:40 PM Jim Melton <jim.melton@sncorp.com> wrote:

As briefly discussed on IRC last night,  I am trying to modify someone else’s block to be more robust (detect or eliminate packet drops). In the ctor, I call message_port_register_out() and it dumps core. The offending call is here: https://github.com/jwmelto/gr-cyberradio/blob/7b048a14f76b140f5cd3edd7d8dfa533e1f892a7/gr-CyberRadio/lib/vita_udp_rx_impl.cc#L427

 

The stack trace from the core is

#0  0x00007ffff4b04973 in pmt::is_pair(boost::shared_ptr<pmt::pmt_base> const&) () from /usr/local/lib64/libgnuradio-pmt.so.3.8.2

#1  0x00007ffff4b07328 in pmt::assv(boost::shared_ptr<pmt::pmt_base>, boost::shared_ptr<pmt::pmt_base>) () from /usr/local/lib64/libgnuradio-pmt.so.3.8.2

#2  0x00007ffff4b075fd in pmt::dict_has_key(boost::shared_ptr<pmt::pmt_base> const&, boost::shared_ptr<pmt::pmt_base> const&) () from /usr/local/lib64/libgnuradio-pmt.so.3.8.2

#3  0x00007ffff73b72e2 in gr::basic_block::message_port_register_out(boost::shared_ptr<pmt::pmt_base>) () from /usr/local/lib64/libgnuradio-runtime.so.3.8.2

#4  0x00007ffff7b58d73 in gr::CyberRadio::vita_udp_rx_impl::vita_udp_rx_impl (this=0x622800, cfg=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>)

    at /tmp/gr-cyberradio/gr-CyberRadio/lib/vita_udp_rx_impl.cc:427

#5  0x00007ffff7b56cb3 in gr::CyberRadio::vita_udp_rx::make (cfg=...) at /tmp/gr-cyberradio/gr-CyberRadio/lib/vita_udp_rx_impl.cc:111

#6  0x000000000040c51d in main (argc=1, argv=0x7fffffffdf18) at /usr/src/project/main.cc:23

 

My minimal test program is here:

#include <CyberRadio/vita_udp_rx.h>

#include <gnuradio/top_block.h>

#include <gnuradio/blocks/file_sink.h>

 

int main(int argc, char** argv)

{

gr::CyberRadio::vita_udp_rx::Cfg cfg;

 

cfg.src_ip = "192.168.110.10";

cfg.port = 8010;

cfg.header_byte_offset = 48;

cfg.samples_per_packet = 1024;

cfg.bytes_per_packet = 4152;

cfg.swap_bytes = true;

cfg.swap_iq = false;

cfg.tag_packets = true;

cfg.uses_v49_1 = false;

 

cfg.debug = true;

 

auto v49 = gr::CyberRadio::vita_udp_rx::make(cfg); // core dump

auto sink = gr::blocks::file_sink::make(sizeof(gr_complex), "test.dat");

 

auto top = gr::make_top_block("Test");

top->connect(v49, 0, sink, 0);

 

return 0;

}

 

According to all that I know, this should work. It clearly does not. I would appreciate any pointers on how to get past this roadblock.

---

Jim Melton

 

CONFIDENTIALITY NOTICE - SNC EMAIL: This email and any attachments are confidential, may contain proprietary, protected, or export controlled information, and are intended for the use of the intended recipients only. Any review, reliance, distribution, disclosure, or forwarding of this email and/or attachments outside of Sierra Nevada Corporation (SNC) without express written approval of the sender, except to the extent required to further properly approved SNC business purposes, is strictly prohibited. If you are not the intended recipient of this email, please notify the sender immediately, and delete all copies without reading, printing, or saving in any manner. --- Thank You.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]