[Source] XJ3D issues
Norbraten, Terry
tdnorbra at nps.edu
Thu May 27 22:54:13 PDT 2010
Felipe,
I can tell you that I ran into similar build problems in the past. What
you have to do is set up your environment ahead of time (before compile) and
the easiest way that I¹ve found to do this (I also build on Mac) is to first
³source xj3d_profile² on the command line.
You¹ll have to modify the enclosed xj3d_profile to suite your build set
up, but it works. The Xj3D doc ³How to Install² talks about Environmental
set up where you modify your bashrc file with pretty much the same elements
of the xj3d_profile, however, not many may want to permanently do this with
their bashrc.
The reason ErrorReporter never compiled is that it depends on a third
party jar: j3d-org-all_1.0.0.jar which you have discovered to set in your
classpath with your javac call with the extdirs switch. So, now you have
two ways to ensure your environment is setup.
The other issue will have to be addressed by others.
Cheers,
Terry
On 5/27/10 3:02 PM, "Felipe Bacim" <fbacim at vt.edu> wrote:
> Hi all,
>
> I'm writing to the list to report a few issues I'm having with the xj3d
> libraries, the first one being related to the code available in the svn and
> the other ones to the replaceWorld function.
>
> First issue
>
> First, my build environment is Mac OS 10.6.3, JDK 1.6.0_17. I'm having serious
> issues using the Makefile provided, more specifically when I do "make ogl".
> All errors (or most of, since this is from 2008) can be seen in this
> webpage: http://www.vrspace.org/~joe/xj3d/Xj3D-linux-howto.html. This guy used
> Fedora 8, JDK 1.6.0_06, so I'm guessing this is not a problem exclusive to Mac
> OS. The problem is that the java compiler can't seem to find reference to
> classes that are in the same directory.
> One example of this is this very first error that I got:
> Building directory src/java/org/web3d/util/
>
>
> Compiling ErrorReporter.java
> Compiling DefaultErrorReporter.java
>
>
> src/java/org/web3d/util/DefaultErrorReporter.java:32: cannot find symbol
> symbol: class ErrorReporter
>
>
> public class DefaultErrorReporter implements ErrorReporter {
> ^
>
>
> Anyway, as described in that webpage, the solution is pretty simple. Every
> time this error occurs, just do
>
>
> javac -d classes -extdirs lib src/java/org/web3d/util/*.java
> and everything is compiled without errors. Well, since with the most recent
> revision in the svn the number of times this happens is even greater than what
> is described in that webpage, I've decided to write a python app that, when
> executed from the trunk directory, parses the Makefile-opengl file to find the
> directory build order, and opens the Makefile on each one of the directories
> to find what files need to be compiled. The output is a bash script that is
> doing all the necessary make steps and compiling everything before "make
> ogl-jar" is called. This may seem like an overkill and may not be the best
> workaround for this issue, but to me it seemed easier to write the parser (it
> took me less than 20 minutes to write it) than to keep my eyes on the
> compilation process or to go through the Makefiles and find what is causing
> this with a library that is so big. Anyway, I'm now able to compile everything
> without a problem. If anyone is interested in either the Python parser or the
> bash script, just let me know and I will post them here.
>
>
>
> Second issue
>
> The second issue I'm having is with the replaceWorld function, just exactly as
> described in http://www.web3d.org/message_boards/viewtopic.php?f=7&t=1353 and
> http://bugzilla.xj3d.org/show_bug.cgi?id=616. Even though the topic and the
> bug report only talk about adding nodes, with the most recent revision I'm not
> being able to do anything, even when I just try to get a root node and change
> some field. The only solution I could find for this is to dispose the window
> and use a new x3dBrowser instance, which is far from ideal. This happens AFTER
> the second time I use the replaceWorld function. With the older version I was
> using, a 2007 snapshot, this problem didn't exist.
>
>
>
> Third issue
>
> The last issue I have is that, in addition to all that was described above,
> the replaceWorld() function seems to have serious memory leak issues. The
> .java source in http://dl.dropbox.com/u/2103745/MemoryLeakTest.zip exemplifies
> this problem by loading an x3d file every time you press a button. Its going
> from ~170mb up to ~680mb by just loading the same x3d file over and over
> again. I'm not sure if its an issue with xj3d or with java but it gets even
> worse when using this function in an application that loads x3d files all the
> time. However, this does not generates any errors, and despite high memory
> usage, the application seems to keep working just fine no matter how many
> times I call replaceWorld. This changes when I register listeners to nodes in
> the scene every time I load an x3d; then I get an OutOfMemoryError. I guess
> one possible solution for this would be to remove the event listeners before
> calling replaceWorld, but just using the removeX3DEventListener function
> doesn't seem to solve the problem. Perhaps that's the function that is
> generating the error? Anyway, both versions of xj3d that I used to date have
> this issue (2007 snapshot and latest revision in the svn).
>
>
> Note: I'm using the same object for all listeners and that the events are not
> being generated. This problem happens even when I just register listeners to
> nodes, so this shouldn't be a problem with my code considering also that
> everything works just fine when I don't register listeners.
>
>
>
> If anyone knows of a snapshot version on which these issues don't exist,
> please let me know.
>
> Best regards,
> Felipe Bacim
>
>
> _______________________________________________
> Source mailing list
> Source at web3d.org
> http://web3d.org/mailman/listinfo/source_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/mailman/private/source_web3d.org/attachments/20100527/dbb421d6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xj3d_profile
Type: application/octet-stream
Size: 4041 bytes
Desc: not available
URL: <http://web3d.org/mailman/private/source_web3d.org/attachments/20100527/dbb421d6/attachment-0001.obj>
More information about the Source
mailing list