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

Invalid OID field exception #234

Open
dbussert opened this issue Sep 2, 2020 · 8 comments
Open

Invalid OID field exception #234

dbussert opened this issue Sep 2, 2020 · 8 comments

Comments

@dbussert
Copy link

dbussert commented Sep 2, 2020

Describe the bug
This file is thought to have valid metadata is and used often for testing

java.lang.IllegalArgumentException: Invalid OID field
at org.jmisb.api.klv.UniversalLabel.testValidity(UniversalLabel.java:71)
at org.jmisb.api.klv.UniversalLabel.(UniversalLabel.java:21)
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:48)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - ] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Invalid OID field
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:85)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - ] ERROR org.jmisb.api.klv.KlvParser - Exception thrown by parser
java.lang.IllegalArgumentException: Invalid OID field
at org.jmisb.api.klv.UniversalLabel.testValidity(UniversalLabel.java:71)
at org.jmisb.api.klv.UniversalLabel.(UniversalLabel.java:21)
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:48)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - ] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Invalid OID field
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:85)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - ] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Length exceeds available bytes
at org.jmisb.api.klv.KlvParser.getNextMessage(KlvParser.java:137)
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:41)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
Exception in thread "MetadataDecodeThread - " java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
at org.jmisb.api.klv.KlvParser.getNextMessage(KlvParser.java:110)
at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:41)
at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)

@dbussert dbussert changed the title Invalid OID field crash Invalid OID field exception Sep 2, 2020
@bradh
Copy link
Collaborator

bradh commented Sep 2, 2020

Can you show the parser inputs? The problem actually looks like it might be further "down", given the Index 16 out of bounds for length 16 part. That looks like we may be going wrong earlier.

Can you make the file available, or provide the name?

@dbussert
Copy link
Author

dbussert commented Sep 3, 2020

I cannot share the whole file, but I might be able to take 1 0601 block and share it. Where do you think the issue is? Would that suffice?

@bradh
Copy link
Collaborator

bradh commented Sep 3, 2020

Remote debugging is pretty hard - I'm not 100% sure what the problem is.

If you can dump out the byte array at KlvParser.java:41 that might help.

@dbussert
Copy link
Author

dbussert commented Sep 3, 2020

is this what you wanted?

[MetadataDecodeThread - <filename>] ERROR org.jmisb.api.klv.KlvParser - Exception thrown by parser
java.lang.IllegalArgumentException: Invalid OID field
        at org.jmisb.api.klv.UniversalLabel.testValidity(UniversalLabel.java:71)
        at org.jmisb.api.klv.UniversalLabel.<init>(UniversalLabel.java:21)
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:51)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - <filename>] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Invalid OID field
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:88)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
Next Message bytes[]: 0x01, 0x01, 0x01, 0x0f, 0x0f, 0x52, 0x41, 0x59, 0x01, 0x00, 0x00, 0x81, 0xc8, 0x01, 0x40, 0xdc,
0xfe, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xff, 0xf6, 0x00, 0x00, 0x69, 0x37, 0x34, 0xaf, 0xc0,
0x00, 0x19, 0x58, 0xaf, 0x11, 0xac, 0x52, 0xe6, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x67, 0x16,
0x4f, 0x01, 0x33, 0x00, 0x00, 0xac, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x7f, 0xfd, 0x0a, 0xa8, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x21, 0x31, 0x7d, 0x7d, 0x18,
0x2c, 0x00, 0x08, 0x53, 0x40, 0x00, 0x00, 0x92, 0x00, 0x90, 0x0a, 0x90, 0x0a, 0x91, 0xa6, 0x00,
0x00, 0xdc, 0x00, 0x6d, 0x74, 0x00, 0x00, 0xc2, 0xac, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
[MetadataDecodeThread - <filename>] ERROR org.jmisb.api.klv.KlvParser - Exception thrown by parser
java.lang.IllegalArgumentException: Invalid OID field
        at org.jmisb.api.klv.UniversalLabel.testValidity(UniversalLabel.java:71)
        at org.jmisb.api.klv.UniversalLabel.<init>(UniversalLabel.java:21)
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:51)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - <filename>] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Invalid OID field
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:88)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
[MetadataDecodeThread - <filename>] ERROR org.jmisb.api.video.MetadataDecodeThread - KLV parse exception
org.jmisb.api.common.KlvParseException: Length exceeds available bytes
        at org.jmisb.api.klv.KlvParser.getNextMessage(KlvParser.java:140)
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:42)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)
Exception in thread "MetadataDecodeThread - <filename>" java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
        at org.jmisb.api.klv.KlvParser.getNextMessage(KlvParser.java:113)
        at org.jmisb.api.klv.KlvParser.parseBytes(KlvParser.java:42)
        at org.jmisb.api.video.MetadataDecodeThread.run(MetadataDecodeThread.java:102)

@bradh
Copy link
Collaborator

bradh commented Sep 7, 2020

Is that the start of the first packet? Looks more like something from mid-stream.

@dbussert
Copy link
Author

dbussert commented Sep 9, 2020

I rechecked, and this is the very first packet that's printed out and the parser errors out immediately after that one

@bradh
Copy link
Collaborator

bradh commented Sep 9, 2020

Then I have no real idea what is happening. That doesn't look like KLV Universal Label I can recognise.

@bradh
Copy link
Collaborator

bradh commented Sep 9, 2020

Any chance you can at least tell me the name of the file (even privately: bradh@frogmouth.net)

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