Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown data type -1 #8

Closed
ghost opened this issue Jan 16, 2016 · 9 comments
Closed

Unknown data type -1 #8

ghost opened this issue Jan 16, 2016 · 9 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jan 16, 2016

Hello,

When I try to open tdms files, the reader throws an exception "Unknown data type -1".
That occurs in the Open() operation:

var tdms = new NationalInstruments.Tdms.File(filePath);
tdms.Open();

This exceptions only occurs sometimes, but I would like to know why. Maybe a problem in the files or maybe a problem with the reader with newest versions of the files.

Thanks in advance!

@mikeobrien
Copy link
Owner

I'm not really sure what could be causing the problem, haven't seen that before. Might want to grab the code and debug it while opening your file, will probably help troubleshoot.

@tommyja
Copy link
Contributor

tommyja commented Mar 19, 2016

@rafa0809 if you post a file with the issue I will take a look.

@betsalel-williamson
Copy link

Line 66 of the Reader.cs file gave -1 which is the source of this issue.

@mikeobrien
Copy link
Owner

Thx! I'll try to take a look as soon as I can. Sorry for the delayed response.

@tom-mcs
Copy link

tom-mcs commented Feb 12, 2019

I am also having this issue. Is there any insight into what is happening?

Stepping through:
File.cs Open() is calling LoadMetadata(reader).ToList();
DataType.cs GetClrType(int dataType) is throwing the exception.

From the stack:
Reader.cs ReadMetadata(Segment segment) is calling GetClrType(metadata.RawData.DataType)

This means that metadata.RawData.DataType is being set to -1 in the line before (i.e. Reader.cs line 66)
metadata.RawData.DataType = _reader.ReadInt32();
It should be set (in my case) to 10: DoubleFloat

@tom-mcs
Copy link

tom-mcs commented Feb 12, 2019

Interesting clue:
The call to _reader.ReadInt32() immediately prior to the one returning -1. Assigns a value of 4713 to rawDataIndexLength.

4713, according to the tdms whitepaper refers to the version number of the tdms file format, which wouldn't seem to have much to do with the rawDataIndexLength. I have observed this result with two separate .tdms files.

Perhaps something is being read out of order for some cases of tdms files.

@tom-mcs
Copy link

tom-mcs commented Feb 12, 2019

Oh solved.

4713 refers to TDMS2.0. As discussed in another issue, this project only supports TDMS1.0. Is that correct? I may be able to use 1.0 in my project.

@mettekou mettekou self-assigned this Jan 17, 2020
@mettekou
Copy link
Collaborator

@ghost @tom-mcs @betsalel-williamson The unrecognized data type -1 (= 0xFFFFFFFF) is DAQmx raw data, which TDMSReader does not currently support. I am closing this issue as a duplicate of #18, which has more information on the subject.

Repository owner locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants