Created attachment 453 [details] valgrind output With a Rigol DP821A connected over USB, running "sigrok-cli -d scpi-pps" with either --scan or --show works, but results in a segmentation fault during shutdown. From valgrind, looks like a null pointer dereference in the std_cleanup->dev_close path.
Just an additional note, this doesn't happen after sigrok-cli has run a capture, so it looks like the problem may arise with dev_close() being called when the device hadn't actually been open.
Created attachment 618 [details] proposal for fix Martin, I attached a patch (developed independently) which might fix your issue. Could you check?
Created attachment 619 [details] proposal for fix Hopefully now correctly uploaded...
Should be fixed in 9b093606545ec3963a03a3cfac61954c62e93e10, thanks! I've tested a similar device, Rigol DP712. Before the patch I didn't get a segfault but rather an error: sr: scpi_serial: Error while sending SCPI command 'SYST:LOCAL': -1. After the patch that error is gone indeed. It's relatively likely that this was the same issue as bug 1151 as well, yeah.