[Cs4800] Warmup Tournament - 10pm tonight

David Richards dirich at ccs.neu.edu
Fri Nov 11 23:48:21 EST 2011


Dennis,

I'd start looking here: src/response/ResponseGetter.java  around line 92.

It seems the exception stems from this call:
>         res = Response.parse("propose " + a.propose(req.getForbidden())
>                 + " oppose " + a.oppose(req.getClaimsToOppose())
>                 + " protocolResponse " + pr);

I would say there's no way that this could be a problem in your code, since the
provided code deals with the serialization of all responses, so as long as you're
returning the correct objects (which you must be since Java is a typed language)
then there's unlikely to be anything wrong with what you're doing.

For future reference, handling errors like the following is extremely bad practice:
>    }catch(Exception e){
>         System.out.println("Exception thrown while parsing: "+ e.getMessage());
>     }

This does nothing to help debug because it doesn't properly print a stack trace
or terminate the program.  The program will continue running, often leading to
further errors that may actually print a stack trace but are often unhelpful in
hunting down the root cause of the problem because they're being encountered
due to the original exception that we just skipped over.  Either handle the
error properly in the catch block, or let it bubble up to a catch block in the caller
that handles it.

-David

On Nov 11, 2011, at 10:46 PM, Dennis Zografos wrote:

> Hi,
> 
> If you can not answer fully at this time, can I at /least/ get a 
> quick response to either or both of the following:
> 
> 1) Is this what the "kicked out for legitimately bad behavior" 
>   messages look like?  Or did I encounter something strange?
> 
> 2) What does "Exception thrown while parsing: 16" mean? Even in a 
>   broad, general sense?
> 
> 3) Should I be trying to debug my code, or yours?
> 
> 
> Has anyone else encountered this?
> 
> 
> 
> ----- "Dennis Zografos" <dzog at zimbra.ccs.neu.edu> wrote:
> 
>> Strange things during tonight's warmup.
>> 
>> Looks like I was kicked out of two games -- but I can't fathom why.
>> This is the same exact codebase I've been using for a week (with
>> the exception of yesterday's warmup where I fudged some provides
>> to a 1.0 quality to test the strengthening mechanic).
>> 
>> When I was "kicked out", my avatar showed the following error:
>> 
>> Exception thrown while parsing: 16
>> !! Exception: null
>> !! StackTrace:
>> -- scg.net.avatar.PlayerServer.createResponse(Unknown Source)
>> -- scg.net.avatar.PlayerServer.playerResponse(Unknown Source)
>> -- sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
>> --
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> -- java.lang.reflect.Method.invoke(Method.java:616)
>> --
>> edu.neu.ccs.demeterf.http.server.ServerDispatch.handle(ServerDispatch.java:75)
>> --
>> edu.neu.ccs.demeterf.http.server.ServerThread$DispatchThread.run(ServerThread.java:130)
>> 
>> 
>> Is this what the kick-out errors look like? What went wrong here?
>> 
>> Again, this is the same .beh I've been using in all the warmup
>> tournaments without issue.
>> 
>> 
>> (to help, maybe, here's the Exception in the context of my own debug
>> output:
>> 
>> GET REQUEST11111
>> *solve(557,217): q=10
>>  dt(557,217):0ms
>>  truncate(557,217):0ms
>>  enumerate(557,217):0ms
>>  populate(557,217):0ms
>> *solve(37,698): q=6
>>  dt(37,698):0ms
>>  truncate(37,698):0ms
>>  enumerate(37,698):0ms
>>  populate(37,698):0ms
>> *solve(321,635): q=9
>>  dt(321,635):0ms
>>  truncate(321,635):0ms
>>  enumerate(321,635):0ms
>>  populate(321,635):0ms
>> *solve(419,439): q=9
>>  dt(419,439):0ms
>>  truncate(419,439):0ms
>>  enumerate(419,439):0ms
>>  populate(419,439):0ms
>> PROPOSING:
>> r   P-hsr(719,127)q=0.013908205841446454
>> r   P-hsr(969,623)q=0.010319917440660475
>> r   P-hsr(685,580)q=0.014598540145985401
>> s   P-hsr(95,4)q=0.07368421052631578
>> Contemplating:
>>   C-hsr(798,180)q=0.012531328320802004
>>    [agreed; q>=0.012531328320802004]
>>   C-hsr(69,654)q=0.10144927536231885
>>    [agreed; q>=0.10144927536231885]
>>   C-hsr(255,2)q=0.09019607843137255
>> Exception thrown while parsing: 16
>> !! Exception: null
>> !! StackTrace:
>> -- scg.net.avatar.PlayerServer.createResponse(Unknown Source)
>> -- scg.net.avatar.PlayerServer.playerResponse(Unknown Source)
>> -- sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
>> --
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> -- java.lang.reflect.Method.invoke(Method.java:616)
>> --
>> edu.neu.ccs.demeterf.http.server.ServerDispatch.handle(ServerDispatch.java:75)
>> --
>> edu.neu.ccs.demeterf.http.server.ServerThread$DispatchThread.run(ServerThread.java:130)
>> 
>> )
> 
> _______________________________________________
> Cs4800 mailing list
> Cs4800 at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/cs4800




More information about the Cs4800 mailing list