Forum: GNU Radio possible bug with hier_block2_detail::msg_disconnect

Bd402e7a2e0e615f954c8251c393dc29?d=identicon&s=25 Mark Cottrell (Guest)
on 2013-09-30 06:28
(Received via mailing list)
Hello all,

I am working with gnuradio 3.7.2git-28-g639e154d and I have a
hierarchical
block with a message output that I have been using as part of a larger
flowgraph.  Yesterday I found that whenever I call msg_disconnect on the
top block with the hier block as the source, I get an error logged about
it
having no subscribers.  I verified this by printing out the subscribers
in
calls to message_port_sub and message_port_unsub.

It seems that when you call msg_connect, the call to message_port_sub is
not made until the flowgraph has been flattened, so the subscription
does
not belong to the hier block, it belongs to the block inside the hier
block
that has the message output.  However, when you call msg_disconnect, it
simply attempts to call message_port_unsub on on the hier block, which
fails, as the hier block has no subscriptions.

To get around this, I simply commented out the call to
message_port_unsub
in msg_disconnect, but this isn't ideal and won't fix the problem in all
cases.

So my question is, is this a bug? If so, is it known about, and if not
can
an issue please be raised to track it?

Thanks,
Mark

--

------------------------------
This email, including any attachments, is only for the intended
recipient.
It is subject to copyright, is confidential and may be the subject of
legal
or other privilege, none of which is waived or lost by reason of this
transmission.
If you are not an intended recipient, you may not use, disseminate,
distribute or reproduce such email, any attachments, or any part
thereof.
If you have received a message in error, please notify the sender
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or
corrupted during transmission nor can we guarantee that any email or any
attachments are free from computer viruses or other conditions which may
damage or interfere with recipient data, hardware or software. The
recipient relies upon its own procedures and assumes all risk of use and
of
opening any attachments.
D3e3c5e41e9aed486856802be823e181?d=identicon&s=25 Johnathan Corgan (Guest)
on 2013-10-12 20:07
(Received via mailing list)
Attachment: johnathan.vcf (335 Bytes)
Attachment: signature.asc (229 Bytes)
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Bd402e7a2e0e615f954c8251c393dc29?d=identicon&s=25 Mark Cottrell (Guest)
on 2013-10-14 00:59
(Received via mailing list)
Attachment: hier_block_msg_disconnect.patch (8 KB)
Attachment: hier_msg_disconnect_issue.py (1 KB)
Hi Johnathan,

I would be happy to raise an issue if someone could give me access (my
username is markcottrell), otherwise, I have attached a script that
reproduces the issue.

I have also attached a patch that seems to fix the issue for me.  There
are
some unit tests in the patch, but they aren't very comprehensive as they
only really test for the absence of an exception, rather than the
message
port actually having been disconnected and the subscriptions cleared.

Thanks,
Mark


On Sun, Oct 13, 2013 at 7:06 AM, Johnathan Corgan
<johnathan@corganlabs.com>wrote:

> > It seems that when you call msg_connect, the call to message_port_sub is
> > So my question is, is this a bug? If so, is it known about, and if not
> http://corganlabs.com
>

--

------------------------------
This email, including any attachments, is only for the intended
recipient.
It is subject to copyright, is confidential and may be the subject of
legal
or other privilege, none of which is waived or lost by reason of this
transmission.
If you are not an intended recipient, you may not use, disseminate,
distribute or reproduce such email, any attachments, or any part
thereof.
If you have received a message in error, please notify the sender
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or
corrupted during transmission nor can we guarantee that any email or any
attachments are free from computer viruses or other conditions which may
damage or interfere with recipient data, hardware or software. The
recipient relies upon its own procedures and assumes all risk of use and
of
opening any attachments.
D3e3c5e41e9aed486856802be823e181?d=identicon&s=25 Johnathan Corgan (Guest)
on 2013-10-14 02:34
(Received via mailing list)
Attachment: johnathan.vcf (335 Bytes)
Attachment: signature.asc (229 Bytes)
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.