[x3d-public] X3DJSAIL. Route Validation issue. Null Pointer Exception

Don Brutzman brutzman at nps.edu
Wed Feb 8 07:35:54 PST 2017


Wow, this was an important bug report.  It led to lots of good fixes, a time-consuming side effect and then full resolution.

Commit summary:
- fix null-pointer exceptions in ROUTE checks if partial ROUTE encountered;
-  restore field-by-field checks in validate(),
- avoid setUSE(getUSE()) pathology resetting all other fields if no USE present, which was occurring mysteriously when validate() methods were repopulated;
- further regex reference on stripping trailing zeros from float/double,
   http://stackoverflow.com/questions/14984664/remove-trailing-zero-in-java
-  findElementByNameValue now works for contained SFNode ProtoInstance, as do other tested cases.
- ConfigurationProperty to forbid/allow file output if exception occurs;

Details:
* Add ConfigurationProperties.setValidationExceptionAllowed to set whether partial results are allowed if validation exception occurs when serializing scene output. Can be useful technique for debugging, validationExceptionAllowed_DEFAULT value is false for strict operation.

	http://www.web3d.org/specifications/java/X3dJavaSceneAuthoringInterface.html#UtilityMethods
	http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/java/Core/ConfigurationProperties.html#setValidationExceptionAllowed-boolean-

On 2/5/2017 9:09 PM, yottzumm at gmail.com wrote:
> See attached.  The error message might be better.  IDK
>
> Exception in thread "main" java.lang.NullPointerException
>
>         at org.web3d.x3d.java.Core.ROUTEObject.validate(ROUTEObject.java:537)

Thanks once again John.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list