How to reproduce: Load a CSV or VCD input file into Pulseview, and re-load
that file by hitting "Run" or SPACE again. Different file formats result in
different behaviour (SEGV within libsigrok's input module, or Pulseview's
$ pulseview -I csv -i digitized.csv
$ pulseview -I vcd -i chronovu_la8_spiflash_read16.vcd
A working theory is that behaviour is due to the difference in code paths
taken, the first load executes InputFile::open() then InputFile::run(),
while the second load skips ::open() and only does ::run(). More research
Somehow I should have known this was discussed before. Bug 1215 discusses
the reason for the implementation detail, and the (undesired) consequences
of removing and re-creating channels which get referenced in Pulseview
It's uncertain whether this report here shall remain separate from bug 1215
which is associated to Pulseview. This report here could get associated to
a requirement for input modules, to not change the channel list across reset()
calls (or throw fatal errors if the channel list changes across reset(), and
users need to close and re-open the file if they change such essential
parameters in their setup.
Commit 08f8421a9e82 (commits up to and including ~) provides common support
code and adjusts the VCD input module, to cope with the situation and avoid
the application side issue. Other input modules can get adjusted in similar
ways. It's assumed that device drivers are not affected, the number and
type of channels should be a property of the device, not the data stream.
Let's keep this item 1241 for the remaining input modules, while bug 1215
discusses the Pulseview side of managing channels.
Happy birthday to the CSV and WAV fixes. :) The fix for CSV is on its way
to mainline with the analog support patch series. Which just leaves WAV as
the last affected module (fix also available in my repo).