fstReaderOpen should not fail on empty FST file#15
Conversation
rfuest
left a comment
There was a problem hiding this comment.
Thanks for adding a test for this. There seems to be some unrelated issue that makes the it fail on Linux and macOS, because out.fst already exists from running the previous test. If you change the filename in the empty file test to something distinct like empty_file.fst it should pass.
I think it's perhaps caused by |
rfuest
left a comment
There was a problem hiding this comment.
LGTM, but I'll let @tbybell take another look and merge the PR.
I think it's perhaps caused by
meson testrunning the two tests concurrently. Should be fixed now.
I hadn't thought about that as a possible cause for the issue, but I think you are right. I've tried to run the tests using meson test -j1 before applying your changes and I couldn't trigger the error.
I've received a couple of bug reports where users reported that GtkWave was unable to open FST files generated by NVC. This is often caused by the FST file being empty (e.g. nickg/nvc#1183 where the user accidentally excluded all signals).
If the FST file is valid but contains no data
fstReaderOpenreturns NULL. It seems better to return a valid handle instead.