Thanks for reporting. Yeah, I agree that it looks like the same issue.
Fixing DAFFODIL-2701 will very likely fix this case as well.
- Steve
On 6/17/22 1:02 PM, Thompson, Mark M [US] (DS) wrote:
Steve,
Here is a slightly different case we ran across where there is no info
about what caused the exception
(I.e. Character I is neither a decimal digit number, decimal point, nor
"e" notation exponential mark),
just the stack trace. Other than that it looks very similar.
Mark T
-----Original Message-----
From: Steve Lawrence <slawre...@apache.org>
Sent: Tuesday, May 31, 2022 4:47 AM
To: users@daffodil.apache.org
Subject: EXT :Re: Daffodil 3.2.1 - An Unexpected exception occurred...
Thanks for reporting the issue.
This looks to just be a bug. I've confirmed what you've described--this bug is
triggered if you use one of the following facet restrictions on an xs:double or
xs:float that parses to NaN, INF, or -INF, and with limited or full validation
enabled:
* minInclusive
* maxInclusive
* minExclusive
* maxExclusive
Unfortunately there isn't a good workaround. I've created DAFFODIL-2701 to
track this issue:
https://issues.apache.org/jira/browse/DAFFODIL-2701
- Steve
On 5/27/22 7:02 PM, Thompson, Mark M [US] (DS) wrote:
All,
I am reporting the occurrence of an exception as requested. The
attached files contain 4 instances of what appears to be the same issue.
During parsing, it seems that the Daffodil validator cannot
handle the occurrence of a non-numeric value in a float element.
The problem
occurs when the float value evaluates to either Infinity or
NaN.
If Validation mode is off, parsing works fine and the appropriate XML is
generated
as requested for all but one case (see below).
1. Float value = Positive Infinity. When Validation is off,
element generated: <BWS_Bandwidth_Limit>INF</BWS_Bandwidth_Limit>
2. Float value = Negative Infinity. When Validation is off,
element generated: <BWS_Bandwidth_Limit>-INF</BWS_Bandwidth_Limit>
3. Float value = Positive NaN . When Validation is off,
element generated: <BWS_Bandwidth_Limit>NaN</BWS_Bandwidth_Limit>
4. Float value = Negative NaN. When Validation is off,
element generated:
<BWS_Bandwidth_Limit>NaN</BWS_Bandwidth_Limit>
Note that “NaN” is output to XML whether the original value was positive
or
negative.
Overview:
* I am not at liberty to provide the actual schema files.
* I may be able to provide test messages if necessary. I’m hoping that
the
attached trace provides more than enough info.
* The Input test files to Daffodil are binary.
* The command used in each case is included in the trace files attached.
* Command line options: -t -vv parse -V limited
* Daffodil version: 3.2.1
* Offending element: BWS_Bandwidth.
Files attached:
1. Trace for Positive infinity case.
2. Trace for Negative infinity case.
3. Trace for Positive NaN case.
4. Trace for Negative NaN case.
Thank you for your time,
Mark M. Thompson
Northrop Grumman Defense Systems
Software Engineer
(818) 712-7439