discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Multiple Tag Debug blocks output on OS X


From: Steven Knudsen
Subject: Re: [Discuss-gnuradio] Multiple Tag Debug blocks output on OS X
Date: Fri, 29 Apr 2016 11:38:39 -0600

Thanks, Tom.

Okay, every once in a while I guess correctly. 

I will look at the logging infrastructure as you suggest. For now, since I do all my OOT dev on Linux, I will be okay. The issue came up when I wanted to make sure the OOT module works on a second box, and that happened to be OS X.

I like singletons :-)


Steven Knudsen, Ph.D., P.Eng.

www.linkedin.com/in/knudstevenknudsen


All the wires are cut, my friends
Live beyond the severed ends.  Louis MacNeice


On Apr 29, 2016, at 11:35, Tom Rondeau <address@hidden> wrote:

On Fri, Apr 29, 2016 at 12:24 PM, Steven Knudsen <address@hidden> wrote:
Hi,

I have a GRC project with multiple Tag Debug blocks. Under Linux, the output appears in the console as one would expect. However, under OS X, the characters of the output appear to be “multiplexed” in some way. The problem goes away if I have only one Tag Debug block enabled. Out of 4 different Tag Debug blocks, it doesn’t seem to matter which subset with more than two is active; the garbled output happens.

It also doesn’t seem to matter if GRC is launched from the built-in Apple Terminal or from an XQuartz terminal.

Has anyone else seen this?

My guess (uneducated at this point) is that maybe there is an issue with an underlying library that is involved in output to stdout, maybe?

Again, everything works perfectly under Linux. GNU Radio on both Linux and OS X is completely up-to-date.

I can live with this, but would like to know what may be happening.

Steven,

You got it; it's a difference in the libc implementation between OS X and Linux. It's a pretty common issue when printing to stderr/stdout in multi-threaded applications. Linux/glibc handles it ok, but you'll still see it get garbled with enough output or fast enough prints.

One suggestion could be to update the tag debug block to use the GNU Radio logging infrastructure. The logger handles multi-threaded output in a much cleaner, more sane way -- basically, because it's all based on a singleton object that manages the output. This would also help define exactly which line is coming from which tag debug block based on the block alias.

Tom


reply via email to

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