[x3d-public] Possible bug in X3DJSAIL, ProtoInstance name

Don Brutzman brutzman at nps.edu
Sun Sep 10 20:47:03 PDT 2017


The latest X3DJSAIL now reflects the matching changes in X3D XML Schema and X3D 
Unified Object Model to no longer require ProtoInstance name for strict 
validation.  This allows a ProtoInstance USE node to match the original 
ProtoInstance DEF.

It remains a semantic error nevertheless to create a ProtoInstance without a 
name, just as it is required in other encodings.

X3DJSAIL ProtoInstanceObject validate() method will throw an error if neither 
the name field nor the USE field is defined.

Your other recent finds regarding index bounds on IndexedTriangle* nodes are 
also incorporated.

So it may be time to refresh your pyjnius efforts.

Looking forward to continuing progress.


On 8/11/2017 11:29 AM, John Carlson wrote:
> Don,
> 
> Please check the order of my calls, and then check X3DJSAIL.  Thanks!
> 
> Traceback (most recent call last):
> 
>    File "arc.py", line 380, in <module>
> 
>      ProtoInstance64.addFieldValue(fieldValue65)
> 
>    File "jnius\jnius_export_class.pxi", line 638, in jnius.JavaMethod.__call__ 
> (jnius\jnius.c:25616)
> 
>    File "jnius\jnius_export_class.pxi", line 715, in 
> jnius.JavaMethod.call_method (jnius\jnius.c:26599)
> 
>    File "jnius\jnius_utils.pxi", line 93, in jnius.check_exception 
> (jnius\jnius.c:4619)
> 
> jnius.JavaException: JVM exception occurred: ERROR_VALUE_NOT_FOUND, 
> ProtoInstance name field is required but no value found.
> 
> Also, I got this interesting error from python generated from xml generated from 
> python generated from xml:
> 
> Traceback (most recent call last):
> 
>    File "X3dHeaderPrototypeSyntaxExamples_new.py", line 289, in <module>
> 
>      Appearance62.setProtoInstance(ProtoInstance63)
> 
> AttributeError: 'org.web3d.x3d.jsail.Shape.AppearanceObject' object has no 
> attribute 'setProtoInstance'
> 
> Probably something’s wrong with the XML output from the original python. I am 
> sending the original XML and python as well.  There’s probably an issue with my 
> original python or X3DJSAIL. It must be calling setMaterial and it’s getting 
> translated to setProtoInstance somehow.  Indeed the containerField on the 
> ProtoInstance didn’t get set with setMaterial) in the output XML.  I think this 
> may be a known bug. Please fix.
> 
> 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