[Cs5500] Error when running MMG Playground

Jessica Lowell lowell.j at husky.neu.edu
Thu Oct 13 09:39:54 EDT 2011


The size of the instances array is being set with the following line in the
ProtocolInterpreter constructor:

instances = new InstanceI[getNoOfObjectTypeInProtocol("instance")];

getNoOfObjectTypeInProtocol is a method of ProtocolInterpreter, which takes
in a String objectType (in this case, "instance").  It loops through all the
Steps and gets the Action in each step.  If, as in this case, objectType is
"instance", it checks whether the Action is a ProvideAction, and, if so
increments the number of this object type in the protocol by 1.  So, this
function is finding one ProvideAction in the protocol, and setting the
instances array to a length of 1 accordingly.

- Jessie

On Thu, Oct 13, 2011 at 9:26 AM, Jessica Lowell <lowell.j at husky.neu.edu>wrote:

> Does this happen in other games, or just the one where Bob's clever avatar
> agrees with Alice's clever avatar?
>
> On Wed, Oct 12, 2011 at 2:16 PM, Madhuvanthi Balasubramanian <
> balasubramanian.m at husky.neu.edu> wrote:
>
>> Hello Everyone,
>>
>>          I've been working on the MMG Playground and clever avatars.
>>          I get an ArrayIndexOutofBounds Exception, w.r.t to SetInstance
>> function in the ProtocolInterpreter Class.
>>          I'm not sure which team is responsible for this component.
>>          Could that team please tell me how the size of the instances
>> array is being set ?
>>
>>          I tried printing out the size of the instances array and I get a
>> value of 1. I'm assuming it has something to do with the number of steps in
>> the protocol.
>>          So when setInstance is invoked from the protocolResponseHandler
>> function of BinaryGame.java, it throws an ArrayIndexOutofBounds Exception.
>>          I cannot figure out what issue is going on here.
>>
>>          Here's the stack trace I see :
>>
>>            Response from root: propose mmg.MMGInstanceSet {{      }}
>> scg.protocol.ForAllExists {{      }} 0.61 1.0 mmg.MMGInstanceSet {{      }}
>> scg.protocol.ForAllExists {{      }}         0.61 1.0 mmg.MMGInstanceSet {{
>>      }} scg.protocol.ForAllExists {{      }} 0.61 1.0 mmg.MMGInstanceSet {{
>>      }} scg.protocol.ForAllExists {{      }} 0.61 1.0  oppose agree agree
>> agree agree  protocolResponse provide mmg.MMGInstance {{  0.0  }}  provide
>> mmg.MMGInstance {{  0.0  }}  provide mmg.MMGInstance {{  0.0  }}  provide
>> mmg.MMGInstance {{  0.0  }}
>> java.lang.ArrayIndexOutOfBoundsException: 1
>> Instance Index 1 Size of array : 1
>> at
>> scg.protocolInterpreter.ProtocolInterpreter.setInstance(ProtocolInterpreter.java:74)
>>  at scg.game.BinaryGame.protocolResponseHandler(BinaryGame.java:533)
>> at scg.game.BinaryGame.convert(BinaryGame.java:457)
>>  at scg.game.BinaryGame.start(BinaryGame.java:133)
>> at scg.tournament.Tournament.startGame(Tournament.java:64)
>>  at scg.tournament.Tournament.run(Tournament.java:52)
>> at java.lang.Thread.run(Unknown Source)
>>
>>        The game is between 2 clever avatars and this issue occurs when Bob
>> agrees to Alice's claim and tries to provide an instance for her to solve.
>>
>>           Whoever is in charge of ProtocolInterpreter, could you look into
>> this issue or call me at 720-362-0602 ?
>>
>>
>> --
>>  Thanks
>> - Madhu
>>
>>
>> _______________________________________________
>> Cs5500 mailing list
>> Cs5500 at lists.ccs.neu.edu
>> https://lists.ccs.neu.edu/bin/listinfo/cs5500
>>
>>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list