Bug 1758 - file import, failed header parsing should stop the process of loading the file
Summary: file import, failed header parsing should stop the process of loading the file
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Input: vcd (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
Depends on:
Reported: 2022-01-03 19:48 CET by Gerhard Sittig
Modified: 2022-08-25 23:39 CEST (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Sittig 2022-01-03 19:48:39 CET
Failed file import reported in bug 1757 and using attachment 758 [details] suggests 
that the pulseview application tries to load the data section of the file 
after the header failed to parse (unsupported data type, a fatal error, 
which was communicated by means of the corresponding return code from the 
function call).
Comment 1 Gerhard Sittig 2022-08-25 23:39:46 CEST
The theory in the above report was wrong. The VCD input module failed to 
communicate the header parse error to the application, which got addressed 
in libsigrok commit 93a28f0b0270. In addition the application was done 
reading all of the file content after that first chunk, and called .end(). 
Which processed previously queued file content, and advanced to the data 
section of the file although parsing its header failed (unnoticedly). 

Other input modules may need inspection whether they suffer from similar 
issues, processing data in .end() after previous .receive() calls failed. 
Changing the component to the library.