[x3d-public] local files. Help debugging with X3DJSAIL runtime errors? Maven. Next steps. Continuous Integration

Don Brutzman brutzman at nps.edu
Mon Oct 23 13:11:14 PDT 2017


Hi John, thanks for looking at this.

Netbeans provides excellent debug support, am able to troubleshoot anything in X3DJSAIL using it.  Setting breakpoints is no problem.

Typically I test using the quite-long examples/HelloWorld.java which has numerous "smoke tests."  Set a breakpoint there or in classes, trace values, step, etc.

I only have a little experience with Maven, so that is a better addition for someone else.  Open source, contributions welcome.

Before going to continuous integration, it might be advisable to build a unit-test suite.  I haven't wanted to spin off into test land from our primary development since dev workflow usually looks like

	idea >
	modify source for compile checks >
	copy/paste into creation stylesheet >
	fix XSLT stylesheet logic, validation >
	regenerate source >
	recompile >
	add or use test code in HelloWorldProgram >
	debug as needed >
	confirm view >confirm outputs using version diffs >
	multiple validation tests of X3D products >
	confirm display view >
	rinse lather repeat >
	commit changes and deploy

	plus periodically run 3904 unit tests when recompiling models in X3D Example Archives

happy to note is that it is REALLY REALLY HARD for undetected errors to creep in.  A great many tests get applied throughout.  8)

this past weekend saw a number of tooltip improvements that get integrated, plus addition of some simple validation tests (i.e. when coordIndex colorIndex etc. are needed).

for me, CI pushes part of the above pretty-intense testing loop into the far distance, probably wouldn't help my progress.  Might well help multiple contributors with running tests tho.

Sorry but Web3D is a bare-bones non-profit.  Ideas welcome to get major sponsorship to support dev ops such as yours.  Who is writing proposals?

have been hoping that you can just use one of the jars to greatly simplify your workflow, how is that working out?

am keen to pursue nashorn and X3DJSONLD correspondences/integration when you are ready, that will be great.

getting python design patterns might encourage us to automate library production... X3DPSAIL anyone?!

am hoping "java code to large" from huge arrays might get fixed by Java 9, or we figure out a better X3dToJava.xslt pattern than breaks arrays into more manageable blocks.  Perhaps predefinition of such arrays in blocks?

will update our X3D Unified Object Model writeups soon.  each loop is good.  onward!

On 4/5/2017 2:08 AM, yottzumm at gmail.com wrote:
> Don,
> 
> Hmm.  Maybe set breakpoints by the ProtoInstances and ProtoDeclare.  I can bring up in the debugger, but so far, I haven’t been running any IDE.  Would be nice if we could “Create new X3DSAIL project” in an IDE (hint, hint).
> 
> I would say it’s nested prototypes which are thwarting the current algorithm, but would have to put it under a debugger to make sure.  I’m getting a lot of these fieldValue errors.  You should at least write out to one format in  your app code, maybe provide methods for each format, with an  output file parameter.
> 
> We should investigate uploading a version of X3DJSAIL to a Maven 2 repository for testing with Maven and IDEs.
> 
> What you probably should do is create a maven POM for building X3DJSAIL.  I can probably help, but will require source to be in PROJECT/src/main/java/org/… as per normal Maven projects—that is, I don’t know how to use stylesheets in Maven, except that it probably goes in the generate-sources phase.  The pom.xml will go in PROJECT.  Your example will go in PROJECT/src/test/java/.  resources (stylesheets) go in PROJECT/src/main/resources/.
> 
> Time to advance to the state of the art for both of us?  I’ve been writing shell scripts **blush**.
> 
> I will write a test project once the main X3DJSAIL pom is written.
> 
> This will make X3DJSAIL palatable for the majority of Java programmers, and will allow for versioning, etc.
> 
> Should we set up a meeting to go over Maven?  Roy?
> 
> I’m wearing out my processors running 8 jobs at a time.  Any chance I can get consortium resources once we get these maven projects built and put into continuous integration.  That is, an account on the continuous integration web page?  I’d like to see the whole thing built and redeployed automatically (if build is successful) whenever something is checked in.  I do believe this is very realizable.   We can set up separate projects for each JSAIL language.
> 
> Should I be working towards a JNI version of X3DJSAIL for C++, or go to back to python and work on the serializer there (in addition to tracking down runtime issues—in any language)?   Or push forward on Nashorn? IKVM (convert jars to dlls) may be the best solution for python, C# (windows).
> 
> I’m getting many more code too large with the function Java style.  Perhaps it’s not a good approach if it has more compiler errors than the more typical java approach?
> 
> Getting the rest of the append errors solved is probably highest priority for me.
> 
> John
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> *From: *Don Brutzman <mailto:brutzman at nps.edu>
> *Sent: *Wednesday, April 5, 2017 2:59 AM
> *To: *yottzumm at gmail.com <mailto:yottzumm at gmail.com>
> *Subject: *Re: local files. Help debugging with X3DJSAIL runtime errors?
> 
> looks like you have nested prototypes here.  so if you are sure protos are declared before they are instanced, that may be thwarting the current algorithm and will require further sleuthing.
> 
> On 4/4/2017 11:45 PM, yottzumm at gmail.com wrote:
> 
>  >
> 
>  >
> 
>  > Don wrote:
> 
>  >
> 
>  > Box.java
> 
>  >
> 
>  >
> 
>  >
> 
>  > You get the following error because parent ProtoInstance and related ExternProtoDeclare/ProtoDeclare aren't yet connected to the same SceneObject, making it impossible to check for correct types.
> 
>  >
> 
>  >
> 
>  >
> 
>  > Must also say that your example illustrates classic Java style very well, and is thus hard to read/follow.  Certainly legal, but (as this example shows) requires more housekeeping.
> 
>  >
> 
>  >
> 
>  >
> 
>  > In the functional style, these are connected before it gets to the fieldValue invocation.
> 
>  >
> 
>  >
> 
>  >
> 
>  > They are?  Please run new attached code (trying to please 😊).  I rewrote my serializer for this, so we’d better get it working!  I can revert my code if necessary.  Actually, I changed an old serializer…
> 
>  >
> 
>  >
> 
>  >
> 
>  > This is the same proto example that everyone is surprised by.  I think we may have the same surprise in store for you again!
> 
>  >
> 
>  >
> 
>  >
> 
>  > This code is in the more functional style (except one array I think).
> 
>  >
> 
>  >
> 
>  >
> 
>  > 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
> 


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