I tried to use Pulseview functionality of pressing on RUN button to reload input file *.vcd. > sigrok-cli -d demo --config samplerate=20k --channels D1,D2,D3 --samples 20k -O vcd -o sample.vcd > pulseview -i sample.vcd -I vcd:downsample=200 -D 1. problem, reported through dbg messages: sr: input/vcd: Invalid timestamp: 5977920 (smaller than previous timestamp) FIX: fixed by adding a line to input/vcd.c in function reset(): inc->prev_timestamp = 0; 2. problem, segmentation fault when dereferencing vcd_ch in function free_channel() FIX: if (vcd_ch) { g_free(vcd_ch->name); g_free(vcd_ch->identifier); g_free(vcd_ch); } 3. segmentation fault: pv::devices::InputFile::run (this=0x555555f84010) at /home/luftek/sw/pulseview/pv/devices/inputfile.cpp:172 172 vector<char> buffer(BufferSize); (gdb) 174 interrupt_ = false; (gdb) 172 vector<char> buffer(BufferSize); (gdb) 174 interrupt_ = false; (gdb) 175 while (!interrupt_ && !f->eof()) { (gdb) 176 f->read(buffer.data(), BufferSize); (gdb) 177 const streamsize size = f->gcount(); (gdb) 178 if (size == 0) (gdb) 181 input_->send(buffer.data(), size); (gdb) Thread 8 "pulseview" received signal SIGSEGV, Segmentation fault. 0x00007ffff694adfe in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (gdb)
Could reproduce the issue here, and got a local change to improve the robustness of the .reset() (and .cleanup()) routines. An issue remains, that Pulseview doesn't like the input module's (or acquisition device driver's) changing or re-building the channel list. This is discussed in bug 1215 and bug 1241. When the .reset/.cleanup improvements went mainline, this report here can get closed as a duplicate of the above items.
Thank you for referencing other bug reports. I thought it had to do only with *.vcd
Fixed in 4237ab9e5ba85153b632b43b7eb2411530e11df8 and 08f8421a9e82fec8bb2fa4e561fea8cb468abcca for vcd, thanks!