LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS error -2503. Is seemingly corrupted file able to be recovered?

Solved!
Go to solution

We performed a rather expensive test with multiple instruments and gauges on a specimen and recorded the data to a TDMS file. Before we performed the test, we recorded to a "dummy" tdms file for a few minutes and then reviewed the file to confirm that we were recording all the gauges properly. Everything was fine and we knew we were ready to test.

 

We then recorded during the test and the TDMS file ended up being about 400 Mb. After recording we attempted to open the file and recieved the following error:

 

"Error -2503
Possible reason(s):
LabVIEW:  Specified file does not comply with TDMS file format standards."

 

There is no record of this error on the forums or anywhere on the website. The data is there, the file is huge. We just need to figure out how to recover it. This data is very important to us. Is there any way to analyze the tdms file and recover the data?

 

Any time we attempt to open the file in any way we receive the same error. We have tried opening it with the TDMS Excel Importer, Open TDMS file.vi, TDMS Defragment. No luck. The error seems to be occurring in the open tdms file.vi.

 

The file is very large or I would post it here. Please help

---------------------------------
[will work for kudos]
Message 1 of 15
(7,926 Views)
Solution
Accepted by topic author rex1030

I solved the problem.

 

I was trying to figure out which part of the tdms file was corrupt. I was preparing for a long day of altering bits/bytes to fix the corruption, which I have done in the past and is never fun, but it wasn't necessary. Using a file analyzer (http://www.safer-networking.org/en/filealyzer/index.html) I could see that the data was there and the headers were correct throughout the data in the tdms file. There didn't appear to be any wierdness in the beginning or end of the file. This told me that the problem was probably in the index file. I had been reviewing the new advanced tdms VIs in LabView 2010 and was looking for something that could help me. The Advanced TDMS Open.vi mentioned that it deleted the index file and opened the tdms file. I thought perhaps it would recreate the index file. It didn't. The tdms index file was automatically recreated when I opened the the TDMS file and it recreated it properly. The data is there. The file opens properly this time. All is well. It definately leaves me wondering what created the corruption in the first place and how to prevent it in the future.

 

Solution:

Delete the tdms index file. The TDMS Excel Importer will recreate the index file properly when you open the file. The file opened with no errors for me.

---------------------------------
[will work for kudos]
Message 2 of 15
(7,919 Views)

I am having the same issue, but since I am running 8.6.1 I do not have the Advanced TDMS Open vi.  Is there anther way to fix this error?  Deleting the index file does not fix it.

 

Thanks!

 

Hunter

0 Kudos
Message 3 of 15
(7,818 Views)

Hi r_h_a,

 

It's possible that your TDMS file is corrupted, and if it didn't work after you deleting the index file, then it's possible that your .tdms file is corrupted. Is that possible for you to attach the tdms file here? 

 

And I just have a simple VI, written half year ago, tried to recovery the corrupted file. If your file is corrupted in the last segment, maybe it would help. However, I can't guarantee that would work.

Message 4 of 15
(7,811 Views)

Can you save the VI in 8.6.1 format?  Since I don't have 9.0 I can not open it.

 

Thanks!

 

Hunter

0 Kudos
Message 5 of 15
(7,805 Views)

Here's a 8.5 version.

0 Kudos
Message 6 of 15
(7,803 Views)

Thank you for the file.  Unfortunately, it did not fix the issue.

0 Kudos
Message 7 of 15
(7,778 Views)

My only advice is to try to find and fix the corruption yourself. Roll up your sleeves because you will be getting into some low level stuff. First you should download the file analyzer program i linked in my solution post. Then you need to understand TDMS files on a low level. The document on TDMS File Format Internal Structure is going to be the key for you to find the corruption and try to fix it. If you are not already familiar with the details of tdms, it may be easier to start with the overview on tdms file format before you get into the low level stuff.

 

If you are in my situation, that data in that file is worth a lot to you and worth putting the work in to find the corruption. It may be something simple like an incomplete data table or eof marker.

 

You might want to simultaneously open a service request.

 

Unfortunately, this corruption problem has happened more than once. We have started to record the raw data from testing as a spreadsheet file, then convert to tdms later. That way, even if problems occur during recording, the data is text in a file already and cannot be corrupted like binary data tables.

 

Good luck mate and keep us posted.

---------------------------------
[will work for kudos]
Message 8 of 15
(7,737 Views)

I posted this in my other thread on this topic, but it looks like it was the TDMS 2.0 update that was the source of the program.  I copied all the VIs and TDMS files to a computer that has been untouched for almost a year and everything worked.  I started copying the old dlls over to this computer and it looks like the probelms are being fixed....though I am sure this is going to creat new issues if I dont revert back everything that was changed in the 2.0 update

 

-Hunter

0 Kudos
Message 9 of 15
(7,695 Views)

Hi YonggingYe,

 

Your are my Guardian angel!! your VI has fix my corrupted file!

 

Thank you so much!!!

 

 

Regards.

0 Kudos
Message 10 of 15
(6,259 Views)