I'm running GNU Radio 3.7 on Linux, CentOS 7. (I know this is old; our customer seems allergic to change. For the time being, I’m stuck with it.)
I’m testing an OOT Python block, a source block created with gr_modtool
. This block includes a queue (queue.Queue
, Python 2.7) where it occasionally puts objects. My testing code gets the objects off the queue. The testing code gets 10 objects off the queue with blocking get
calls, successfully, then it does some very simple tests. In the course of these tests, the test code calls one of the block’s getter functions, just
def amplitude(self):
return self._amplitude
At this point, GNU Radio hangs. A print statement in the getter function prints self._amplitude
correctly, but then a print statement in the test code, directly after the call to amplitude
, never prints. Print statements in the block’s work
function show the block’s thread entering work
and leaving work
, but work
never executes again after the call to amplitude
.
The flow graph I’m using in the test code is very simple:
My_source_block -> throttle -> GR’s debug tag block
I don’t know how to debug this. If a block’s thread dies for some reason, does GNU Radio just quit silently? Perhaps the block raises an exception and GNU Radio swallows it and dies some time later. I don’t know how to find out. I can’t imagine why a call to amplitude
from the test code would cause a problem, particularly when a print statement put in amplitude
prints the correct value of self._amplitude
successfully.
Another peculiarity: My block runs just fine in gnuradio_companion
.
I’m out of ideas. Thoughts?