|
From: Zhi Z. <zz...@au...> - 2011-07-28 03:25:15
|
Hi there I am getting an run-time error while firing up my repast simphony model and I am currently on version 2.0 beta. From the error stack, I think it is complaining the watcheeFieldNames in the Watch annotation. The error only happens on two of the three watches I have defined in my project and I really don't know why. The problematic watch is defined as: @Watch ( watcheeClassName = "NGNMarketSimulation.ConsumerAgent", whenToTrigger = WatcherTriggerSchedule. *IMMEDIATE*, watcheeFieldNames = "FinishSelection", triggerCondition = "$watchee.CheckallCOFinishSelection()") The FinishSelection boolean variable and the trigger method CheckallCOFinishSelection() have all been defined in the ConsumerAgent Class. I have compared the two problematic watch with the one that is working and found out that the method "repast.simphony.engine.watcher.WatcherEditor.edit" gets called three times for the problematic watch for only twice for the watch that is working. Any helps will be much appreciated. Benson ZHONG. ERROR [AWT-EventQueue-0] 2011-07-28 14:42:50,463 repast.simphony.ui.RSApplication - Scenario Load Error * repast.simphony.scenario.ScenarioLoadException * : 92 at repast.simphony.scenario.ScenarioLoader.load( *ScenarioLoader.java:219*) at repast.simphony.ui.RSApplication.open( *RSApplication.java:361*) at repast.simphony.ui.RSAppConfigurator.postWindowOpen( *RSAppConfigurator.java:39*) at saf.core.ui.GUICreatorDelegate.runDisplay( *GUICreatorDelegate.java:188*) at saf.core.ui.GUICreator$1.run( *GUICreator.java:18*) at simphony.util.ThreadUtilities$Runner.run( *ThreadUtilities.java:33*) at simphony.util.ThreadUtilities.runInEventThread( *ThreadUtilities.java:47*) at saf.core.ui.GUICreator.runDisplay( *GUICreator.java:16*) at repast.simphony.ui.RSUIPlugin$1.run( *RSUIPlugin.java:92*) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(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) Caused by: *java.lang.ArrayIndexOutOfBoundsException*: 92 at javassist.bytecode.StackMapTable$Walker.stackMapFrames( *StackMapTable.java:192*) at javassist.bytecode.StackMapTable$Walker.parse( *StackMapTable.java:179*) at javassist.bytecode.StackMapTable$Shifter.doit( *StackMapTable.java:714*) at javassist.bytecode.StackMapTable.shiftPc( *StackMapTable.java:693*) at javassist.bytecode.CodeIterator.insertGap0( *CodeIterator.java:676*) at javassist.bytecode.CodeIterator.insertGap( *CodeIterator.java:636*) at javassist.bytecode.CodeIterator.insertGapCore( *CodeIterator.java:467*) at javassist.bytecode.CodeIterator.insertGap( *CodeIterator.java:413*) at javassist.expr.Expr.replace0( *Expr.java:298*) at javassist.expr.FieldAccess.replace( *FieldAccess.java:213*) at repast.simphony.engine.watcher.WatcherEditor.edit( *WatcherEditor.java:57*) at javassist.expr.ExprEditor.loopBody( *ExprEditor.java:197*) at javassist.expr.ExprEditor.doit( *ExprEditor.java:90*) at javassist.CtClassType.instrument( *CtClassType.java:1289*) at repast.simphony.engine.watcher.WatcheeInstrumentor.instrument( *WatcheeInstrumentor.java:155*) at repast.simphony.scenario.ScenarioWatcheeInitializer.initWatchees( *ScenarioWatcheeInitializer.java:73*) at repast.simphony.scenario.ScenarioWatcheeInitializer.run( *ScenarioWatcheeInitializer.java:34*) at repast.simphony.scenario.ScenarioLoader.load( *ScenarioLoader.java:113*) ... 16 more |