discuss-gnuradio
[Top][All Lists]
Advanced

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

SOLVED - Re: File Source - File Sink data transfer


From: user 1
Subject: SOLVED - Re: File Source - File Sink data transfer
Date: Thu, 19 May 2022 12:49:52 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

The problem is solved !

It was a conflict between my 3.9.6 release of Gnu Radio and older files remaining from previous installations of Gnu Radio.

After a big cleaning, a new compilation and fresh installation of the 3.10.2.0 release, the data transfer works fine.

Thank you to all, specially to Marcus Müller.


jeff



Le 18/05/2022 à 17:26, Marcus Müller a écrit :
Hi!

ah, a first indication for that would be if you can find more of one libgnuradio-blocks (which aren't just symlinks to each other); `locate libgnuradio-blocks` is often an easy way to find that.

Note that I'm really not sure this is the explanation. It's just my best guess what might be the reason that two symbols don't match although they should.

Best regards,
Marcus

On 18.05.22 17:04, user 1 wrote:
Marcus,

Thank you for your detailed explanation.

My file  ~/gnuradio/gr-blocks/lib/file_source_impl.cc  is exactly the same the file you mentionned in your answer.

I checked the .yml and it seems OK too.


To install my 3.9.6 release of Gnuradio from sources, on my Ubuntu 20.04 release, I followed the following procedure:

1) installation of all the needed dependencies:

https://wiki.gnuradio.org/index.php?title=UbuntuInstall#Focal_Fossa_.2820.04.29_through_Impish_Indri_.2821.10.29

2) installation of Volk, then Gnu Radio from sources as described here:

https://wiki.gnuradio.org/index.php/InstallingGR


Maybe files of a previous installation of an old Gnu Radio release are in conflict with the present installation ?

In this case how can I totally delete them ?


Thank you




Le 18/05/2022 à 13:02, Marcus Müller a écrit :
Hi Jeff,

yeah, that's odd; I was just assuming you were literally typing () in that field, but that just is the string representation of PMT_NIL, so: my apologies :)

What's mainly odd is that PMT_NIL is not accepted; it certainly works for me, and I've checked: There's no code changes in that block's tag handling, the GRC block or the python bindings, and also not to the add_item_tag method, between GNU Radio v3.9.6 and what I'm running :/

What's really confusing is this: If you look at the file source's source code, what it does is check whether you're at the file beginning AND whether the begin tag is NOT PMT_NIL, and only if that's the case, it'd actually call the `add_item_tag` method that fails [1].

  279   │         if (d_file_begin && d_add_begin_tag != pmt::PMT_NIL) {
  280   │             add_item_tag(0,
  281   │                          nitems_written(0) + noutput_items - size,
  282   │                          d_add_begin_tag,
  283   │                          pmt::from_long(d_repeat_cnt),
  284   │                          _id);
  285   │             d_file_begin = false;
  286   │         }

So, if pmt.PMT_NIL was actually successfully passed to the file source, this should never be called! But: it does seem to be called. But it's also being called with something that might very well actually *be* an instance of pmt_null, just maybe not the one and only instance of pmt_null that should exist, namely PMT_NIL?!

This all reeks of Static Initialization Order Fiasco, but I'm really confused on how that could arise here :/ It's a bit as if your flowgraph's python and your file_source's C++ use a different PMT_NIL, although in both it should 100% be the same. Looking for something to hold onto: How did you install your GNU Radio?

Best regards,
Marcus

[1] https://github.com/gnuradio/gnuradio/blob/v3.9.6.0/gr-blocks/lib/file_source_impl.cc#L279-L286

On 18.05.22 12:13, user 1 wrote:
Hi Marcus,

Thank you for your message.


pmt.PMT_NIL is the default value of add begin tag, but unfortunately that doesn't work, see the error message (Screenshots 1 and 2).

However, after many trials, if I put under the add begin tag the values:

    pmt.string_to_symbol("file_begin")

or

    pmt.string_to_symbol("")

or

    pmt.string_to_symbol("whatever_you_want")


finaly the data transfer works fine !

See (Screenshots 4 and 5)


Odd, isn'it ?



Jeff







reply via email to

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