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

nuget package v1.0.3 fails to parse one of my screen's EDID #1

Open
nk64 opened this issue Jun 11, 2020 · 2 comments
Open

nuget package v1.0.3 fails to parse one of my screen's EDID #1

nk64 opened this issue Jun 11, 2020 · 2 comments

Comments

@nk64
Copy link

nk64 commented Jun 11, 2020

Hi, I 've been having a bit of fun with your library (v 1.0.3 from nuget).
I get an exception parsing one the 6 EDIDs that I tried.

Sample Code

byte[] hisenseEdidTable =
{
	0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
	0x20, 0xA3, 0x2F, 0x00, 0x01, 0x00, 0x00, 0x00,
	0x0C, 0x1D, 0x01, 0x03, 0x80, 0x73, 0x41, 0x78,
	0x0A, 0xCF, 0x74, 0xA3, 0x57, 0x4C, 0xB0, 0x23,
	0x09, 0x48, 0x4C, 0x21, 0x08, 0x00, 0x81, 0xC0,
	0x81, 0x40, 0x81, 0x80, 0x01, 0x01, 0x01, 0x01,
	0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x04, 0x74,
	0x00, 0x30, 0xF2, 0x70, 0x5A, 0x80, 0xB0, 0x58,
	0x8A, 0x00, 0x50, 0x1D, 0x74, 0x00, 0x00, 0x1E,
	0x02, 0x3A, 0x80, 0x18, 0x71, 0x38, 0x2D, 0x40,
	0x58, 0x2C, 0x45, 0x00, 0x50, 0x1D, 0x74, 0x00,
	0x00, 0x1E, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x48,
	0x49, 0x53, 0x45, 0x4E, 0x53, 0x45, 0x0A, 0x20,
	0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFD,
	0x00, 0x18, 0x4B, 0x0F, 0x51, 0x1E, 0x00, 0x0A,
	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x7C
};

try
{
	var edid = EEDID.Parse(hisenseEdidTable);
	var edidBlock = edid.Blocks[KnownDataBlock.EDID];
} 
catch (Exception ex)
{
	Console.WriteLine(ex.ToString());
}

Exception

System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at iTin.Core.ReadOnlyCollectionExtensions.Extract(ReadOnlyCollection`1 data, Byte start, Byte lenght)
   at iTin.Core.Hardware.Specification.EEDID.GetExtensionDataBlocks(ReadOnlyCollection`1 edidData)
   at iTin.Core.Hardware.Specification.EEDID.InitBlockTable(IDictionary`2 blockDictionary)
   at iTin.Core.Hardware.Specification.EEDID.get_BlockTable()
   at iTin.Core.Hardware.Specification.EEDID.get_HasBlocks()
   at iTin.Core.Hardware.Specification.EEDID.get_Blocks()

What I have Tried

I tried master branch and the v1.0.3 tag from github and the problem seems to be resolved there.
I decompiled the dlls from the nuget package and I feel like the nuget package that is marked as v1.0.3 might not contain the updates that are found in the source code from v1.0.3 tag in github.

For now I can use a self compiled DLL from the master branch.
I hope you will consider pushing out a new nuget package.

Thanks for the library.
nk64.

@iAJTin
Copy link
Owner

iAJTin commented Jun 12, 2020

hi @nk64

First, thanks for your interest in development,

Regarding your question, you are right, I am missing indicating it in the CHANGELOG file.

I will soon update the nuget package to version v1.0.4

Thanks again for your interest in the software, and feel free to comment and try it out.

Regards

@iAJTin
Copy link
Owner

iAJTin commented Jul 31, 2020

hi @nk64,

I just published a new nuget package (v1.0.4), you can see the changes apart from the one you commented on in the previous post at the following link https://github.com/iAJTin/iEEDID/blob/master/CHANGELOG.md

Thanks for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants