Troubleshooting
Flowgraphs fail in a small number of
characteristic ways. This chapter takes
them in the order a new builder meets
them, each with the check that tells it
apart from its neighbours. The lab hit
several of these itself; where it did,
the transcript in gnu-radio-lab/ is
the evidence, and examples/lab-notes.txt
keeps the list.
The flowgraph runs and finishes instantly
Symptom: you press run, it ends at once, no error, no output — or a file far smaller than the run should make.
Usual cause: no throttle and no hardware. A chain fed from a file or a signal source, with nothing to pace it, runs as fast as the computer can — a one-second signal processed in a blink is correct behaviour wearing a worrying face. If the output file is empty, though, suspect the chain itself: a block with nothing connected, or a source pointed at a file that is not there, and read the console output from the top — GNU Radio says what it could not open, once, early, in passing.
The check: count the output file's samples (chapter 6's measurement) and compare with rate × seconds. Right count, instant run: pacing, not failure.
The sound is garbled, doubled, or musical in the wrong way
Symptom: audio plays but wrong — chipmunk-fast, slowed to a drawl, or with phantom tones that were never in the signal.
Usual causes, in order: a rate lie somewhere (a block told the wrong sample rate, so everything downstream believes the lie — the audio sink's rate is the classic), or aliasing (chapter 3): something above the Nyquist boundary folded in, most often because a decimation had no filter in front of it (chapter 9 built exactly this wreck on purpose).
The check: walk the chain asking chapter 3's question — what rate is it here? — then tap the stream with a file sink before the suspect block and measure what is actually there.
Nothing arrives from the hardware
Symptom: file-based flowgraphs run; the moment a real device is the source, silence, zeroes, or "device not found".
Usual cause: the driver seam of chapter 15, not the flowgraph. The operating system and GNU Radio meet the hardware through a vendor or community driver layer, and the failure lives there: permissions on the device file, a second program (or a second library) holding the device, firmware the library dislikes.
The check: prove the device outside
GNU Radio first — the vendor's own test
utility should see it and stream from
it. Only when the neighbour's tool
works and yours does not is the
flowgraph itself suspect. (The lab had
no hardware to demonstrate this on; the
procedure is documented practice, and
criteria.md labels it so.)
Overruns: the waterfall has holes
Symptom: letters like U or O
printing while the graph runs, clicks
in the audio, gaps in recordings.
Meaning: the computer fell behind — samples arrived faster than the chain processed them, and the overflow was thrown away. Chapter 15 priced this: the bill exceeded the machine.
The cure, in order: decimate earlier (chapter 9), soften the filter (transition band is money), close the visual sinks you are not watching (a spectrum display is a block too, and not a cheap one), and only then consider faster hardware. A flowgraph that overruns at a rate the machine can nearly afford often runs clean at nine tenths of it.
The Companion editor will not open at all
Symptom: gnuradio-companion fails
at launch, complaining — in the lab's
case verbatim — Namespace Gtk not
available.
Meaning: the editor is a GTK program, and the windowing toolkit's Python bindings are a separate package your install route did not pull in. Nothing is wrong with GNU Radio; a limb of the desktop stack is missing.
The cure: install the bindings
(the lab: sudo apt install
gir1.2-gtk-3.0), after which the
editor opened cleanly. And note that
grcc, the compiler of chapter 5,
needs no display and no GTK at all: a
machine that cannot open the editor
can still compile and run everything
the editor would have made
(t06-companion-gui.txt keeps both
the failure and the fix).
The Companion will not generate, or the generated file will not run
Symptom: red blocks in the canvas, a generate step that refuses, or Python errors from code you did not write.
Usual causes: a type mismatch on a wire — the port colours are the type system (chapter 5): blue complex, orange float, and a wire between colours needs a converter block, not optimism. A variable used before it is defined, or two blocks given the same name. And version skew: a flowgraph saved by a newer Companion opened in an older one.
The check: read the Companion's own
error list first — it names the block
and the reason — and change one thing
at a time. For version skew, open the
.grc file in a text editor: it is
readable text, and the header says
which version wrote it (chapter 13).
It worked yesterday
Symptom: the demonstration everyone meets eventually.
Usual causes: an update moved a block or renamed a parameter; the working directory changed, so relative file paths point at new emptiness; or the graph you saved is not the graph you fixed (two copies, one edited).
The check: gnu-radio-config-info
(or your package manager) for the
version, the run's first console lines
for the file paths it actually opened,
and the file's own modification time.
Yesterday's success is data: something
changed, and it is findable.