02-26-2021 12:03 PM
TDMS will crash LabVIEW 2020 when it encounters a file of size zero. I am not sure how our test system generated a zero length file. We now check for a zero length file and delete it. I was able to simulate a zero length file with the following code.
I do not need a response. I wanted to mention it in case others have an issue with TDMS.
02-26-2021 01:02 PM
You are "mixing" incompatible functions in your example code. Not sure why it is crashing for you. If you have a completely empty file, it means the TDMS header is not being written.
mcduff
02-26-2021 03:29 PM
I am aware that the functions are incompatible under normal circumstances and that there is no header in the file. The point of the example is to show that if, somehow, the header is not written such that the file size is zero, functions that expect the file to have a header will crash the system. I do not know how we ended up in that situation. Normally, we have never had an issue. I have fixed tour code to check for a file size of zero to make sure that LabVIEW does not crash our test station.
02-27-2021 09:07 PM
Not convinced about the 0 file size. The following creates an empty file and does not crash LabVIEW 2020 64bit; your other file though did crash it.
mcduff
03-01-2021 10:36 AM
When I look file size after your function executes, I see that the file size is not zero and has the header in it. My example shows a TDMS file with a file size of zero. Not another file type that you created.
NO Kudos for you !
03-01-2021 01:09 PM
@Bill2021 wrote:
TDMS will crash LabVIEW 2020 when it encounters a file of size zero.
The following snippet will create an initial file of 0 bytes; when using the TDMS Open it automatically adds a header to the 0 byte file.
¯\_(ツ)_/¯
LabVIEW did not crash when it "encountered" a 0 TDMS byte file; it actually "fixed" the TDMS file and added a header.
Check out this one, makes a 0 byte file. ¯\_(ツ)_/¯
Hmmm....
Still think you have other issues.
mcduff
05-12-2023 03:31 AM
I experience the same thing.
A 0 Byte TDMS file was somehow created and the TDMS List Contents leads to a crash to desktop.
LV 2020