Bug 1847 - Cannot save sessions
Summary: Cannot save sessions
Alias: None
Product: PulseView
Classification: Unclassified
Component: File handling (show other bugs)
Version: 0.5.0
Hardware: x86 Windows
: Normal major
Target Milestone: ---
Assignee: Nobody
Depends on:
Reported: 2023-05-01 23:15 CEST by marko
Modified: 2023-05-04 13:31 CEST (History)
0 users

screenshot (4.29 KB, image/png)
2023-05-02 17:38 CEST, marko

Note You need to log in before you can comment on or make changes to this bug.
Description marko 2023-05-01 23:15:11 CEST
I am using Cypress FX2.  After capturing a session, I want to save the data on the disk.

This works only if all 16 channels are captured.  If I capture, say, only four channels, I get error "Failed while saving: invalid argument".
Comment 1 marko 2023-05-01 23:46:23 CEST
Interestingly, if I capture all channels, and then deselect all but four, it saves only those four.  But if I capture only four, there is no workaround for saving.

This is extremely annoying, as I cannot afford to capture all channels as I need very high sampling.
Comment 2 marko 2023-05-02 17:38:29 CEST
Created attachment 797 [details]
Comment 3 marko 2023-05-02 17:39:37 CEST
Full text of error:

Failed to save session.

Error while saving: invalid argument
Comment 4 marko 2023-05-02 18:41:04 CEST
The error in logging is 

sr: output/srzip: Unexpected unit size, discarding logic data.

This obviously has to do with unit size; for my product with 16 channels unit size is by default 2.  My speculation is that if I use only channels in 1-8 range, pulseview saving module expects unit size 1, but is returned unit size 2 or vice versa.

Interestingly, if I use at least one channel in the 9-16 range, everything is fine, regardless if I use any channel in 1-8 range.  However in this case higher frequency sampling is no longer working.  Sampling for one channel in 1-8 range is much higher than sampling for one channel in 9-16 range, which is really strange.

The solution is for program to ignore unit size mismatch.
Comment 5 marko 2023-05-04 13:31:43 CEST
OK, this project is obviously dead. So I will respond in part to my bug report so that others know the solution.

How to use the Lcsoft Mini Board (16 channels):

1. If you only sample the channels of the first set (D0-D7), the highest sampling frequency is 24 MHz. If you also sample the channels of the second set (D8-D15), the highest sampling frequency drops to 12 MHz.

2. If you only sample the channels of the first set, PulseView cannot save: "Failed to save session. Error while saving: invalid argument". The workarounds are:

a. Sample at least one channel of the second set.

b. Sample only the channels of the first set, but save the results as Raw binary logic data. Open a new session and import Raw binary logic data (you must specify the number of channels and the sampling rate). Now the data can be saved normally.