Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Questions and Comments (http://www.alice.org/community/forumdisplay.php?f=9)
-   -   My project with 6-plus hours worth of programing now crashes plz help (http://www.alice.org/community/showthread.php?t=3633)

Slayer2520 12-15-2009 10:34 AM

My project with 6-plus hours worth of programing now crashes plz help
 
So I've been making a knock version of final fantasy for a programming class. I've created a randomizer so that it runs battle scenes at random and it crashes as the enemy HP number variables drop to or below 0 and I have a function to end the battle scene.

Error during simulation.




Alice version: 2.2 8/1/2009



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:360)

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

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.ConditionalBehavior.internalSchedule(ConditionalBehavior.java:39)

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

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:99)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$7.run(AuthoringTool.java:704)

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.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.Dialog$1.run(Unknown Source)

at java.awt.Dialog$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

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

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

at java.awt.Component.setVisible(Unknown Source)

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

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

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

at edu.cmu.cs.stage3.alice.authoringtool.Actions$16.actionPerformed(Actions.java:175)

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

at javax.swing.AbstractButton$Handler.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 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.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.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)
________
[URL="http://maryjanes.info/"]maryjane[/URL]

x2495iiii 12-15-2009 05:42 PM

Ugh, that's an ugly one.

Post your world and I'll see if I can fix it for you.

Slayer2520 12-16-2009 09:57 AM

1 Attachment(s)
Please and thank you. I think it's a little late to be helped on my project but I would like to learn what it is that I am doing wrong. Thank you.
________
[URL="http://www.honda-wiki.org/wiki/Honda_Unicorn"]Unicorn[/URL]

x2495iiii 12-16-2009 10:18 AM

The only error I'm getting from your world is the error I always get when an Alice world uses an event to interrupt an animation (which I'm told only happens to me and a few others). The sound plays fine, and I'm betting that if I fixed the glitch, the world would play fine too.

jediaction 01-06-2010 11:29 AM

I know, ive lost 16 hours of work but its ok now, ive worked on a better version of it. Im sorry btu all i can say is, go to and older back up version of it and see if it works, you can not fix it


All times are GMT -5. The time now is 12:21 PM.

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