Alice Community  

Go Back   Alice Community > Alice 2 > Bugs and Troubleshooting

Reply
 
Thread Tools Display Modes
Odd "Error During Simulation" Problem
Old
nickjuly4
Junior Member
 
nickjuly4's Avatar
 
Status: Offline
Posts: 6
Join Date: Dec 2009
Location: Wisconsin
Default Odd "Error During Simulation" Problem - 12-11-2009, 04:29 AM

I've been working on my final project for my Intro. to Programming class for about 3 1/2 days now and suddenly it started giving me an odd error telling me that there was an error during simulation. What's really odd about this is that it worked just fine when I ran it about 5 minutes before that and when I loaded one of my projects backups from 12 minutes earlier I got the same error even though it has worked before. Also when I close the first simulation error I then get another error saying "Error during world stop." I tried running it in Alice 2.2 but I got the same error and for some reason the Dog model turns a shiny silver color. I attached my project file so if anyone can help me I'd appreciate it.

Is there any way to fix this?

The simulation error:
Code:
Error during simulation.

Alice version: 2.0 04/05/2005
os.name: Windows NT (unknown)
os.version: 6.0
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 1.3.1_10-b03
user.dir: C:\Program Files\Alice\Alice\Required

Throwable that caused the error:
java.lang.RuntimeException

	at edu.cmu.cs.stage3.alice.core.question.PropertyValue.getValue(PropertyValue.java:100)

	at edu.cmu.cs.stage3.alice.core.Property.evaluateIfNecessary(Property.java:380)

	at edu.cmu.cs.stage3.alice.core.Property.getValue(Property.java:407)

	at edu.cmu.cs.stage3.alice.core.property.BooleanProperty.getValue(BooleanProperty.java:33)

	at edu.cmu.cs.stage3.alice.core.property.BooleanProperty.getBooleanValue(BooleanProperty.java:45)

	at edu.cmu.cs.stage3.alice.core.property.BooleanProperty.booleanValue(BooleanProperty.java:48)

	at edu.cmu.cs.stage3.alice.core.property.BooleanProperty.booleanValue(BooleanProperty.java:56)

	at edu.cmu.cs.stage3.alice.core.response.IfElseInOrder$RuntimeIfElseInOrder.prologue(IfElseInOrder.java:51)

	at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childPrologueIfNecessary(DoInOrder.java:52)

	at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:97)

	at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:57)

	at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:98)

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

	at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehavior.internalSchedule(TriggerBehavior.java:69)

	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)



The World Stop Error:
Code:
Error during world stop.

Alice version: 2.0 04/05/2005
os.name: Windows NT (unknown)
os.version: 6.0
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 1.3.1_10-b03
user.dir: C:\Program Files\Alice\Alice\Required


Throwable that caused the error:
java.lang.NullPointerException

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

	at edu.cmu.cs.stage3.alice.core.Behavior.popStack(Behavior.java:359)

	at edu.cmu.cs.stage3.alice.core.response.LoopNInOrder$RuntimeLoopNInOrder.epilogue(LoopNInOrder.java:102)

	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$RuntimeResponse.stop(Response.java:115)

	at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehavior.stopAllRuntimeResponses(TriggerBehavior.java:97)

	at edu.cmu.cs.stage3.alice.core.Behavior.stopped(Behavior.java:385)

	at edu.cmu.cs.stage3.alice.core.Element.stopped(Element.java:1881)

	at edu.cmu.cs.stage3.alice.core.World.stop(World.java:496)

	at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.stop(DefaultClock.java:58)

	at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.worldStopRunning(AuthoringTool.java:5012)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.RenderContentPane.postDialogShow(RenderContentPane.java:221)

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

	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 Files
File Type: a2w Final Project.a2w (10.10 MB, 7 views)
   
Reply With Quote
Old
nickjuly4
Junior Member
 
nickjuly4's Avatar
 
Status: Offline
Posts: 6
Join Date: Dec 2009
Location: Wisconsin
Default 12-11-2009, 01:54 PM

Hmm, after checking again I noticed it pops an error when I load it but then closes it quickly. So, I checked the Error Console and it says something about my CatCycle method, which is a method that runs on an infinite loop throughout the program that makes a cat appear at one of the doghouses. I deleted the CatCycle method from running when the world starts and the error didn't come up, but what's odd about this is that the method ran just fine before so I'm not sure why it's suddenly causing errors. Does anyone know what's wrong with my CatCycle method and how I could fix it?

EDIT:
I found the part of the CatCycle method that seems to be causing the problem. Apparently, the If/Else statement that checks if the new randomly selected location is already being occupied by a dog by checking the item from the Dogs list which contains all the dogs. I'm not sure why this is causing the error because it worked just fine before, so maybe it's some weird glitch.



This is the error I get:
Code:
Alice version: 2.0 04/05/2005
os.name: Windows NT (unknown)
os.version: 6.0
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 1.3.1_10-b03
user.dir: C:\Program Files\Alice\Alice\Required

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed3__.__Unnamed1__.__Unnamed0__.__Unnamed1__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed3__.__Unnamed1__.__Unnamed0__.__Unnamed1__.__Unnamed1__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)

	at java.lang.Thread.run(Unknown Source)

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed3__.__Unnamed2__.__Unnamed0__.__Unnamed1__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed3__.__Unnamed2__.__Unnamed0__.__Unnamed1__.__Unnamed1__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)

	at java.lang.Thread.run(Unknown Source)

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed5__.__Unnamed4__.__Unnamed0__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed5__.__Unnamed4__.__Unnamed0__.__Unnamed0__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)

	at java.lang.Thread.run(Unknown Source)

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed5__.__Unnamed4__.__Unnamed1__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed5__.__Unnamed4__.__Unnamed1__.__Unnamed0__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)

	at java.lang.Thread.run(Unknown Source)

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed6__.__Unnamed2__.__Unnamed3__.__Unnamed1__.__Unnamed0__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed6__.__Unnamed2__.__Unnamed3__.__Unnamed1__.__Unnamed0__.__Unnamed0__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)

	at java.lang.Thread.run(Unknown Source)

PropertyReference[property=edu.cmu.cs.stage3.alice.core.property.OverridableElementProperty[name=element,owner=edu.cmu.cs.stage3.alice.core.response.PropertyAnimation[world.CatCycle.__Unnamed0__.__Unnamed6__.__Unnamed2__.__Unnamed3__.__Unnamed1__.__Unnamed1__]],criterion=edu.cmu.cs.stage3.alice.core.criterion.InternalReferenceKeyedCriterion[CatCycle.__Unnamed0__.__Unnamed6__.__Unnamed2__.__Unnamed3__.__Unnamed1__.__Unnamed1__.__Unnamed0__]]

java.lang.ClassCastException: java.lang.Object

	at edu.cmu.cs.stage3.alice.core.Element.getValueClassForPropertyNamed(Element.java:1907)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.updateOverrideValueClasses(PropertyAnimation.java:55)

	at edu.cmu.cs.stage3.alice.core.response.PropertyAnimation.propertyChanged(PropertyAnimation.java:66)

	at edu.cmu.cs.stage3.alice.core.Element.propertyChanged(Element.java:271)

	at edu.cmu.cs.stage3.alice.core.Property.onChanged(Property.java:423)

	at edu.cmu.cs.stage3.alice.core.Property.onSet(Property.java:438)

	at edu.cmu.cs.stage3.alice.core.Property.set(Property.java:455)

	at edu.cmu.cs.stage3.alice.core.reference.PropertyReference.resolve(PropertyReference.java:52)

	at edu.cmu.cs.stage3.alice.core.Element.load(Element.java:1538)

	at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadElementProgressPane.construct(LoadElementProgressPane.java:36)

	at edu.cmu.cs.stage3.progress.ProgressPane$2.run(ProgressPane.java:82)
	at java.lang.Thread.run(Unknown Source)

Last edited by nickjuly4; 12-11-2009 at 02:33 PM.
   
Reply With Quote
Old
nickjuly4
Junior Member
 
nickjuly4's Avatar
 
Status: Offline
Posts: 6
Join Date: Dec 2009
Location: Wisconsin
Default 12-11-2009, 02:33 PM

When I copied the conditional statement to the clipboard then pasted it over the old one it works again, so I guess it was some weird glitch since I copied the SAME conditional from before. The only problem now is that whenever I reload it the error still comes back.

Last edited by nickjuly4; 12-11-2009 at 02:56 PM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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