NASA-PDS / validate

Validates PDS4 product labels, data and PDS3 Volumes
https://nasa-pds.github.io/validate/
Apache License 2.0
16 stars 11 forks source link

validate does not handle special constants with data type of SignedLSB2 #674

Closed kbowley-asu closed 1 year ago

kbowley-asu commented 1 year ago

Checked for duplicates

No - I haven't checked

🐛 Describe the bug

When I ran validate (3.3.0-SNAPSHOT) against a pds4 label with special constants for a product with a SignedLSB2 data type, I noticed that validate blew up with a FATAL_ERROR

🕵️ Expected behavior

I expected validate to validate the pds4 product without blowing up with a java error.

📜 To Reproduce

  1. Download product and label from https://pds.lroc.asu.edu/data/LRO-L-LROC-3-CDR-V1.0/LROLRC_1055A/DATA/ESM5/2023075/NAC/M1433566422LC.IMG and https://pds.lroc.asu.edu/data/LRO-L-LROC-3-CDR-V1.0/LROLRC_1055A/DATA/ESM5/2023075/NAC/M1433566422LC.xml
  2. run validate against the xml file
  3. FATAL_ERROR [error.array.bad_file_read] array 1: Error occurred while reading data file: class java.lang.Short cannot be cast to class java.math.BigInteger (java.lang.Short and java.math.BigInteger are in module java.base of loader 'bootstrap')

🖥 Environment Info

📚 Version of Software Used

$ validate --version

gov.nasa.pds:validate Version 3.3.0-SNAPSHOT Release Date: 2023-07-25 03:27:16

🩺 Test Data / Additional context

No response

🦄 Related requirements

No response

⚙️ Engineering Details

No response

jordanpadams commented 1 year ago

@kbowley-asu I can replicate the issue. We will add this to the backlog. What is the urgency on this fix?

kbowley-asu commented 1 year ago

Due to the various updates to validating Special_Constants, version 3.1.1 is the last version of validate that we've been able to use. I just noticed this bug when I tried using the latest SNAPSHOT version while working on some tweaks to our tools that generate PDS4 labels for our products.