APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

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

Help with a problem please post and replies

Return to the Help with a problem please thread
Login to post to this thread

Help with a problem
Peio IƱurrigarro
1 Posts

Hello,

I'm a new user of the program. I have done a simulation of the solar system in 3 dimensions and sometimes when I rotate the view I get this error (copied from console):


Exception in thread "Thread-2" java.lang.NullPointerException
at org.opensourcephysics.drawing3d.simple3d.SimpleElementTrail.computePositions(Unknown Source)
at org.opensourcephysics.drawing3d.simple3d.SimpleElementTrail.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.Element.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.ElementTrail.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.Group.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.Group.processChanges(Unknown Source)
at org.opensourcephysics.drawing3d.simple3d.SimpleDrawingPanel3D.paintDrawableList(Unknown Source)
at org.opensourcephysics.drawing3d.simple3d.SimpleDrawingPanel3D.paintEverything(Unknown Source)
at org.opensourcephysics.drawing3d.simple3d.SimpleDrawingPanel3D.render(Unknown Source)
at org.opensourcephysics.drawing3d.simple3d.SimpleDrawingPanel3D.render(Unknown Source)
at org.opensourcephysics.drawing3d.DrawingPanel3D.render(Unknown Source)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.finalUpdate(Unknown Source)
at org.colos.ejs.library.control.EjsControl.finalUpdate(Unknown Source)
at org.colos.ejs.library.Animation.update(Unknown Source)
at org.colos.ejs.library.Animation.step(Unknown Source)
at org.colos.ejs.library.Animation.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


It doesn't happen always in the same evolution step, sometimes it happens sooner and other times it takes more time to happen.

I don't know how to fix it so I would appreciate some help.

Thank you very much,

Peio.

Attached File: solarsystem.rar


Replies to Help with a problem

Re: Help with a problem -
juan camilo
1 Posts

Good morning
I also present a similar problem, I'm doing a simulation in which the user selects that activity wants to do. So it is necessary to restart variables, hide some windows and make visible other.
The error that occurs is as follows,
Exception in thread "Thread-8" java.lang.NullPointerException
at java.text.DecimalFormat.checkAndSetFastPathStatus(Unknown Source)
at java.text.DecimalFormat.fastFormat(Unknown Source)
at java.text.NumberFormat.format(Unknown Source)
at org.opensourcephysics.display.axes.CartesianType1.formatNum(Unknown Source)
at org.opensourcephysics.display.axes.CartesianType1.getLeftGutter(Unknown Source)
at org.opensourcephysics.display.axes.CartesianType1.draw(Unknown Source)
at org.opensourcephysics.display.axes.CartesianInteractive.draw(Unknown Source)
at org.opensourcephysics.display.PlottingPanel.paintFirst(Unknown Source)
at org.opensourcephysics.display.DrawingPanel.paintEverything(Unknown Source)
at org.opensourcephysics.display.DrawingPanel.render(Unknown Source)
at org.opensourcephysics.display.DrawingPanel.render(Unknown Source)
at org.colos.ejs.library.control.swing.ControlDrawablesParent.finalUpdate(Unknown Source)
at org.colos.ejs.library.control.EjsControl.finalUpdate(Unknown Source)
at org.colos.ejs.library.Animation.update(Unknown Source)
at org.colos.ejs.library.Animation.step(Unknown Source)
at org.colos.ejs.library.Animation.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thank you
Best regard



Re: Re: Help with a problem -
Francisco Esquembre
228 Posts

Hello,

Both problems are completely different. The one with the 3D trail may be caused by a synchronization issue. I run your example (a nice one, by the way!) and could not reproduce it. The synchronisation of the Java VM in MacOSX can be better than in Windows...

The other problem is probably due to a bad choice of the min an max of X or Y in the plotting panel.

Paco

Post edited August 31, 2015 at 12:45 PM EST.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book