The Open Source Physics website will be unavailable Friday evening through Saturday afternoon as electrical work occurs in the American Center of Physics server room. Down time will begin at 6PM Eastern Time on Friday. Service is expected to resume by 6PM on Saturday, July 30.

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Java 3D bug in the implementation used to implement the scene

Return to the EJS Modeling forum
Login to post to this thread

Java 3D bug in the implementation used to implement the scene - Mar 8, 2012 at 9:14PM
lookang Avatar
lookang
175 Posts

Java 3D bug in the implementation used to implement the scene

hi paco!
i have a java 3d ejs file that loads in EJS_4.3.6_120219 only if the implementation field is set to JAVA3D as oppose to a selectable variable called"mode" which allows toggling from SIMPLE3D and JAVA3D.


my Java version is C:\Program Files\Java\jre7
my Ejs version is  C:\LooKang\EJS_4.3.6_120219\EJS_4.3.6
my workspace is C:/LooKang/workspace/

when i change the implementation field to JAVA3D, the console has some error as below.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.opensourcephysics.drawing3d.java3d.Java3dStyle.setTexture(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dStyle.applyStyleChange(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dElement.styleChanged(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dElementImage.styleChanged(Unknown Source)
at org.opensourcephysics.drawing3d.Element.styleChanged(Unknown Source)
at org.opensourcephysics.drawing3d.utils.Style.notifyChange(Unknown Source)
at org.opensourcephysics.drawing3d.utils.Style.setTexture(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dElementImage.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.Element.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dDrawingPanel3D.update(Unknown Source)
at org.opensourcephysics.drawing3d.java3d.Java3dDrawingPanel3D.forceRefresh(Unknown Source)
at org.opensourcephysics.drawing3d.DrawingPanel3D.cameraChanged(Unknown Source)
at org.opensourcephysics.drawing3d.DrawingPanel3D.setImplementation(Unknown Source)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.setImplementation(Unknown Source)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.setValue(Unknown Source)
at org.colos.ejs.library.control.ControlElement.setProperty(Unknown Source)
at org.colos.ejs.library.control.ControlElement.setProperty(Unknown Source)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.setProperty(Unknown Source)
at org.colos.ejs.osejs.view.ViewElement.setTheProperty(Unknown Source)
at org.colos.ejs.osejs.view.ViewElement.doTheChange(Unknown Source)
at org.colos.ejs.osejs.view.ViewElement.access$7(Unknown Source)
at org.colos.ejs.osejs.view.ViewElement$MyMouseListener.mouseClicked(Unknown Source)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


but it runs well :)

and if the implementation field is "mode", the error is the same but the applet hangs .


hope this info is useful in your enhancement of EJS

Post edited March 8, 2012 at 9:12 PM EST.

Attached File: ejs_EarthAndSatelite05.zip


OSP@SG blog
OSP@SG Digital Library

The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics