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