NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
September 21, 2020, 11:00:44 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Brevity is the Soul of wit. ..."Shakespeare (154-1616, English dramatist and poet) "
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Runtime error in Magnetic Bar Field Model  (Read 6774 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member
*****
Offline Offline

Posts: 1796


http://weelookang.blogspot.com


WWW
«
Embed this message
on: April 18, 2010, 05:30:12 pm »

http://www.compadre.org/OSP/items/detail.cfm?ID=9414
when i move the compass very quickly, sometimes it is possible to get a runtime error.
any idea how the error can be solved?
I tried to fix it but can't figure out the cause, i increase the array to nx and ny to [21] but that didn't solve the runtime error.
i have been puzzled by this runtime error. i can't understand what is causing it. chance to look at it ? thanks!

"Where is "Thread-3"? this error position happen at this point, i did a screen capture

Error is:
Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 20
   at org.opensourcephysics.drawing2d.VectorField.prepareField(Unknown Source)
   at org.opensourcephysics.drawing2d.VectorField.draw(Unknown Source)
   at org.opensourcephysics.display.DrawingPanel.paintDrawableList(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.updateWhenIdle(Unknown Source)
   at org.colos.ejs.library.control.EjsControl.updateSimulationWhenIdle(Unknown Source)
   at org.colos.ejs.library.control.ControlElement.variablesChanged(Unknown Source)
   at org.colos.ejs.library.control.drawing2d.ControlElement2D.propagatePosition(Unknown Source)
   at org.colos.ejs.library.control.drawing2d.ControlElement2D.reportMouseMotion(Unknown Source)
   at org.colos.ejs.library.control.drawing2d.ControlElement2D.interactionPerformed(Unknown Source)
   at org.opensourcephysics.drawing2d.Element.invokeActions(Unknown Source)
   at org.colos.ejs.library.control.swing.UpdateHotSpot2DDelayedAction.performAction(Unknown Source)
   at org.colos.ejs.library.Animation.checkMethodsInvokedByView(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)