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

John Carlson yottzumm at gmail.com
Mon Sep 11 08:47:53 PDT 2017


Don't forget that output XML from X3DJSAIL will need to remove the name
when USE is used.

On Sep 11, 2017 10:45 AM, "Don Brutzman" <brutzman at nps.edu> wrote:

> cc: Roy
>
> On 9/10/2017 11:23 PM, John Carlson wrote:
>
>> Did you address why setMaterial does not set the containerField?  Should
>> it?   Thanks!
>>
>
> Interesting possibility, let me think about it further.  Might be a
> general pattern here when inserting ProtoInstance in non-default
> containerField locations.
>
>   I will test with X3dToJava.xslt, if that is up to date.
>>
>> John
>>
>
> I haven't yet worked on X3dToJava.xslt or X3dToJson.xslt output
> serialization regarding the current issue for ProtoInstance USE not having
> a name field.  Am expecting that Java will need the name field but JSON
> will not.
>
> On Sep 10, 2017 11:47 PM, "Don Brutzman" <brutzman at nps.edu <mailto:
>> brutzman at nps.edu>> wrote:
>>
>>     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 <mailto:brutzman at nps.edu>
>>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>> +1.831.656.2149 <tel:%2B1.831.656.2149>
>>     X3D graphics, virtual worlds, navy robotics
>> http://faculty.nps.edu/brutzman <http://faculty.nps.edu/brutzman>
>>
>>
>>
>
> 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/brutzma
> n
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170911/9e4e2b88/attachment-0001.html>


More information about the x3d-public mailing list