Bug 1841 - Request: Add auto-save while capturing
Summary: Request: Add auto-save while capturing
Status: CONFIRMED
Alias: None
Product: PulseView
Classification: Unclassified
Component: File handling (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-16 10:46 CEST by cedric
Modified: 2023-04-16 10:46 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cedric 2023-04-16 10:46:39 CEST
Overview: I would like pulseview to autosave during a capture, so the data of the samples is still there. 

Steps to Reproduce:
1) Start Pulseview.
2) Change the samplerate to 100Hz (to have more time for the following steps)
3) Click Run. Now data is coming in, and traces are drawn.
4) On a separate console, type "killall -s 9 pulseview" to simulate a crash. Pulseview now dissapears (as expected)
5) Start Pulseview. Pulseview starts in the default state, without any data.

Actual Results:
Pulseview has lost all data and settings after a crash.

 
Expected Results:
At step 3, I would like pulseview to start streaming the sample data to disk, as well into the display memory. For this to work without asking the user, Pulseview needs a default location to save that data, and settings to change the default location, and limit the max amount of data that is stored there.
At step 5, I would like pulseview to restore the data up to the point of the crash, so I don't loose the sample data. if this data is large, pulseview can ask the user if he wants the data to be restored, as that can take some time.

Build Date & Hardware: I build it myself on 04/15/2023 on a 64 bit AMD machine.
Versions, libraries and features:
PulseView
0.5.0-git-62c0968
Qt
5.15.9
glibmm
2.66.6
Boost
1_81
exprtk
20200101
libsigrok
0.6.0-git/4:0:0 (rt: 0.6.0-git-5bce22ac/4:0:0)
- glib
2.76.1 (rt: 2.76.1/7601:1)
- zlib
1.2.13
- libzip
1.9.2
- minilzo
2.10
- libserialport
0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
- libusb-1.0
1.0.26.11724 API 0x01000109
- hidapi
0.13.1
- bluez
5.66
- libftdi
1.5
- Host
x86_64-pc-linux-gnu, little-endian
- SCPI backends
TCP, RPC, serial, USBTMC
libsigrokdecode
0.6.0-git-d7da8b9/4:0:0 (rt: 0.6.0-git-d7da8b9/4:0:0)
- glib
2.76.1 (rt: 2.76.1/7601:1)
- Python
3.10.10 / 0x30a0af0 (API 1013, ABI 3)
- Host
x86_64-pc-linux-gnu, little-endian
Kernel version: $ uname -a 
Linux cedric 6.2.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 13 Apr 2023 16:59:24 +0000 x86_64 GNU/Linux

Additional Builds and Platforms:
Not explicitly tested with this exact version, but the windows version running on windows 10 also does this.

Additional Information:
Notepad++ on Windows is a great example of a program that does auto save in the background, so crashes/updates/unplanned alt-F4 presses, dead batteries and so on are not a problem anymore.