Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Bugs and Troubleshooting (http://www.alice.org/community/forumdisplay.php?f=18)
-   -   Error during simulation (http://www.alice.org/community/showthread.php?t=244)

Informatikkurs 05-29-2006 05:15 AM

Error during simulation
 
[COLOR="Red"]Hello,

we have a problem with our Alice ( 2.0 04/05/2005 )!

Here is the Error:[/COLOR]



Error during simulation.




Alice version: 2.0 04/05/2005

os.name: Windows 98

os.version: 4.10

os.arch: x86

java.vm.name: Java HotSpot(TM) Client VM

java.vm.version: 1.3.1_10-b03

user.dir: \\LEHRER\ALICE\Required



Throwable that caused the error:

java.lang.ArrayIndexOutOfBoundsException: -1 not in range [0,2)

at edu.cmu.cs.stage3.alice.core.Behavior$Fork.getNext(Behavior.java:113)

at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.top(Behavior.java:55)

at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.pop(Behavior.java:48)

at edu.cmu.cs.stage3.alice.core.Behavior.closeFork(Behavior.java:176)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:85)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:81)

at edu.cmu.cs.stage3.alice.core.behavior.AbstractConditionalBehavior.internalSchedule(AbstractConditionalBehavior.java:112)

at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Behavior.java:225)

at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehaviors(Sandbox.java:70)

at edu.cmu.cs.stage3.alice.core.World.scheduleBehaviors(World.java:444)

at edu.cmu.cs.stage3.alice.core.World.schedule(World.java:486)

at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.schedule(DefaultClock.java:94)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$11.run(AuthoringTool.java:681)

at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:115)

at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:76)

at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.Dialog.show(Unknown Source)

at edu.cmu.cs.stage3.swing.DialogManager.showModalDialog(DialogManager.java:58)

at edu.cmu.cs.stage3.swing.DialogManager.showDialog(DialogManager.java:123)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.play(AuthoringTool.java:5073)

at edu.cmu.cs.stage3.alice.authoringtool.Actions$15.actionPerformed(Actions.java:167)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)

at java.awt.Component.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.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)


This error occours while simulating our Project, in which we have to press a button, BUT when we stop to press the button this error occours.

Our teacher in computing is unsystematic with this thematic....:confused:

And we hope YOU can help us!!

Yours Informatikkurs

gabe 05-29-2006 12:26 PM

If you can attach your world that demonstrates this bug, we can take a look at it and try to figure out what is causing the problem.

Informatikkurs 06-07-2006 02:11 AM

problem solved
 
Thank you for your help,
but this problem was caused by our :mad: 133mhz :mad: computers.

lanceA 06-09-2006 09:22 PM

I would be interested in understanding how the speed of your processor caused the problem. And more importantly, [B]how did you determine[/B] that the problem was attributable to the processor speed?

[B][U]How you localized the problem to the processor speed would be beneficial to all of us.[/U][/B]

Simply running a program on another machine is not indicative of the cause of the problem. The other machine might have more memory, a different processor, fewer processes running, etc.

Any additional information other than [I]the speed of the processor [/I]which helped you solve this problem would be very helpful.

Thanks

Jabberwocky 06-10-2006 01:30 AM

98
 
Could this have been an operating system problem? The minimum OS requirements for Alice are Windows ME, 2000 or XP (See [url=http://www.alice.org/faq2.htm#MachineReq]How fast a machine do I need?[/url]on the troubleshooting page). The error output above shows the system producing the error was a Windows 98 machine.

Jabberwocky 06-10-2006 02:02 AM

CPU bottleneck
 
Perhaps it's a thread overrun, to many processes are generated and it bogs down the CPU. The second line in the error log does mention forking...

Here's an article from the Sun site: [url=http://developers.sun.com/solaris/articles/processbehavior.html]Analyzing Process Behavior[/url]

AliceNoob 10-09-2008 04:41 AM

Need help on Error During Simulation
 
2 Attachment(s)
Hi,

i just created an simple alice world with controls to move a bikerkid object with the a chase cam feature.

However, when i start to run the simulation and hold down "w" for a few seconds to move the the bikerkid forward and release "w" key, an error occurs saying "Error during simulation". (some ArrayIndexOutOfBoundsException)

Error message as follow:

Error during simulation.

Alice version: 2.0 04/05/2005

os.name: Windows XP

os.version: 5.1

os.arch: x86

java.vm.name: Java HotSpot(TM) Client VM

java.vm.version: 1.3.1_10-b03

user.dir: D:\My NTU\FYP\ALICE\Prog\Alice 2.0\Required



Throwable that caused the error:

java.lang.ArrayIndexOutOfBoundsException: -1 not in range [0,2)

at edu.cmu.cs.stage3.alice.core.Behavior$Fork.getNext(Behavior.java:113)

at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.top(Behavior.java:55)

at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.pop(Behavior.java:48)

at edu.cmu.cs.stage3.alice.core.Behavior.closeFork(Behavior.java:176)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:85)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)

at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.epilogue(CallToUserDefinedResponse.java:94)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:81)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)

at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.epilogue(CallToUserDefinedResponse.java:94)

at edu.cmu.cs.stage3.alice.core.behavior.AbstractConditionalBehavior.internalSchedule(AbstractConditionalBehavior.java:112)

at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Behavior.java:225)

at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehaviors(Sandbox.java:70)

at edu.cmu.cs.stage3.alice.core.World.scheduleBehaviors(World.java:444)

at edu.cmu.cs.stage3.alice.core.World.schedule(World.java:486)

at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.schedule(DefaultClock.java:94)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$11.run(AuthoringTool.java:681)

at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:115)

at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:76)

at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.Dialog.show(Unknown Source)

at edu.cmu.cs.stage3.swing.DialogManager.showModalDialog(DialogManager.java:58)

at edu.cmu.cs.stage3.swing.DialogManager.showDialog(DialogManager.java:123)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.play(AuthoringTool.java:5073)

at edu.cmu.cs.stage3.alice.authoringtool.Actions$15.actionPerformed(Actions.java:167)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)

at java.awt.Component.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.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)




Attached: Test.a2w and capture00.jpg

Need help badly pls ... any help will be much appreciated
Thanx in advance

DrJim 10-10-2008 12:21 PM

ArrayIndexOutOfBoundsException
 
One frequent cause for this error (or a simple index out of bounds error) is that a method is stopped (by releasing the key) in the middle of a loop.

Do a search of the forum for walk methods (where this problem has often occured) - you will see several examples of this problem and some work-arounds.


All times are GMT -5. The time now is 04:24 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.