Skip to content

IllegalArgumentException when short 2 byte messages are decoded #12

@filipjonckers

Description

@filipjonckers

Version: v0.2.1
Input message causing an issue (e.g. 8D40621D58C382D690C8AC2863A7)
*50D0;
*0000;
*0206;
*3070;
*7006;

All mode A/C replies, ACAS ...

Describe the issue

disabling modeac in dump1090 is a workaround to fix but if the option is enabled it will throw IllegalArgumentException errors
The following errors are thrown several times per second:

00:35:40.563 ERROR Message could not be parsed java.lang.IllegalArgumentException: 0 > -1 at java.base/java.util.Arrays.copyOfRange(Arrays.java:3856) java.lang.IllegalArgumentException: 0 > -1 at java.base/java.util.Arrays.copyOfRange(Arrays.java:3856) at aero.t2s.modes.decoder.Common.isValid(Common.java:109) at aero.t2s.modes.decoder.Decoder.decode(Decoder.java:28) at aero.t2s.modes.ModeSTrackHandler.handleSync(ModeSTrackHandler.java:61) at aero.t2s.modes.ModeSTrackHandler.lambda$handle$0(ModeSTrackHandler.java:56) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions