[x3d-public] Changes to X3DJSAIL accepted? Final! outstanding error in my data folder for X3DJSAIL[ with my patches, of course ] - getting to v1.0

Don Brutzman brutzman at nps.edu
Tue May 23 08:05:43 PDT 2017


Hi John.  The patches are useful but take some sleuthing on this end, unfortunately. I can't really apply them directly because the actual code that gets changed is in the X3DJSAIL generation stylesheet, which always replaces all of the end-product .java source.

If you might include comments in your patches, perhaps pointing to example scene or describing what it is fixing, that will help me get the proper correction applied.

All of the immense unit testing we continue to pursue is really productive.  Last night's end-to-end Java retest exposed three scenes with fixable errors (corrections already checked in) and identified another SAI idiosyncracy.  Better and better!

Since we are getting very close to full coverage, and since the API seems quite stable for a while now.  I'm just about ready to declare that X3DJSAIL is ready for v1.0 and sufficiently stable for production use.

Please advise if you think there are any critical bugfixes for that milestone.  Testing and improvements and feature additions will continue, of course.  TIA.

On 5/20/2017 7:38 PM, John Carlson wrote:
> Do I need to make changes to the stylesheet for X3DJSAIL to accept my patches?  Please let me know!  Also insure that JSON output is correct from X3DJSAIL after stylesheet changes.  You will need to will need to add my patches to make reasonable Java and JavaScript code output correct XML and JSON, methinks.  Patch to X3DJSAIL Java code is attached, Also to find field type and access types from fieldValue names in ProtoInstances and fieldValues (in the field or (Extern)ProtoDeclare field).
> 
> -------------------------------------------------------------------------------------------------------------------------------------------
> 
> Also this Exception:
> 
> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ERROR_VALUE_NOT_FOUND, ProtoInstance name field is required but no value found.
> 
>          at org.web3d.x3d.jsail.Core.ProtoInstanceObject.validate(ProtoInstanceObject.java:1088)
> 
>          at org.web3d.x3d.jsail.Core.fieldValueObject.validate(fieldValueObject.java:1010)
> 
>          at org.web3d.x3d.jsail.Core.ProtoInstanceObject.addFieldValue(ProtoInstanceObject.java:1167)
> 
>          at jdk.nashorn.internal.scripts.Script$arc_sail.:program(../nashorn/net/coderextreme/data/arc.sail.js:140)
> 
>          at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
> 
>          at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
> 
>          at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
> 
>          at jdk.nashorn.tools.Shell.apply(Shell.java:471)
> 
>          at jdk.nashorn.tools.Shell.runScripts(Shell.java:400)
> 
>          at jdk.nashorn.tools.Shell.run(Shell.java:179)
> 
>          at jdk.nashorn.tools.Shell.main(Shell.java:143)
> 
>          at jdk.nashorn.tools.Shell.main(Shell.java:119)
> 
> Uses of ProtoInstance look like this (note, I won’t always have a DEF, so I can’t use the constructor with name and DEF.  Suggest putting name first, and making DEF optional—or can I set DEF to null?, or provide alternate constructor with just name.).  Java Code is attached –same error as JavaScript.  JavaScript is not attached because of extension.
> 
> var ProtoInstance0 = null;
> 
> var ProtoInstance1 = null;
> 
> var ProtoInstance2 = null;
> 
> var ProtoInstance3 = null;
> 
> var ProtoInstance4 = null;
> 
> var ProtoInstance5 = null;
> 
> var ProtoInstance6 = null;
> 
> var ProtoInstance7 = null;
> 
> var ProtoInstance8 = null;
> 
> var ProtoInstance9 = null;
> 
> var ProtoInstance10 = null;
> 
> var ProtoInstance11 = null;
> 
> var ProtoInstance12 = null;
> 
>          .addChild(ProtoInstance0 = new ProtoInstanceObject().setName("point").setDEF("start"))
> 
>          .addChild(ProtoInstance1 = new ProtoInstanceObject().setName("point").setDEF("end1"))
> 
>          .addChild(ProtoInstance2 = new ProtoInstanceObject().setName("point").setDEF("end2"))
> 
>          .addChild(ProtoInstance3 = new ProtoInstanceObject().setName("point").setDEF("end3"))
> 
>          .addChild(ProtoInstance4 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector1"))
> 
>          .addChild(ProtoInstance7 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector2"))
> 
>          .addChild(ProtoInstance10 = new ProtoInstanceObject().setName("x3dconnector").setDEF("connector3"))
> 
> ProtoInstance4
> 
>              .addChild(ProtoInstance5 = new ProtoInstanceObject().setName("point").setUSE("start")));
> 
> ProtoInstance4
> 
>              .addChild(ProtoInstance6 = new ProtoInstanceObject().setName("point").setUSE("end1")));
> 
> ProtoInstance4
> 
> ProtoInstance7
> 
>              .addChild(ProtoInstance8 = new ProtoInstanceObject().setName("point").setUSE("start")));
> 
> ProtoInstance7
> 
>              .addChild(ProtoInstance9 = new ProtoInstanceObject().setName("point").setUSE("end2")));
> 
> ProtoInstance7
> 
> ProtoInstance10
> 
>              .addChild(ProtoInstance11 = new ProtoInstanceObject().setName("point").setUSE("start")));
> 
> ProtoInstance10
> 
>              .addChild(ProtoInstance12 = new ProtoInstanceObject().setName("point").setUSE("end3")));
> 
> ProtoInstance10
> 


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