[Soot-list] NullPointerException with -ast-metrics?

Eric Bodden eric.bodden at mail.mcgill.ca
Mon Mar 23 11:07:12 EDT 2009


I just committed some improved error-handling code.

Eric

2009/3/23 Maja Frydrychowicz <mfrydr at cs.mcgill.ca>:
> Hey Eric,
>
> Thanks for responding. It works (sort of) with the -polyglot option.
> For some reason, compilation fails at the end and no xml file is
> produced (my understanding is that -ast-metrics should produce
> astMetrics.xml). I get the impression this problem might have more to
> do with the example java files I'm using than anything else, but I've
> attached the output in case you're interested.
>
> This time I ran:
>
> $ java soot.Main -cp . -pp -polyglot -verbose -ast-metrics -app SearchGame > out
>
>
>
> On Mon, Mar 23, 2009 at 09:30, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
>> Hi Maja.
>>
>> Can you please try the same in combination with the -polyglot option?
>> I suspect that computing the AST metrics is actually done within
>> polyglot but polyglot is not used any more by default. Please confirm
>> whether that works and if it does then I will see that I can have Soot
>> give a more appropriate error message in this case.
>>
>> Eric
>>
>> 2009/3/22 Maja Frydrychowicz <mfrydr at cs.mcgill.ca>:
>>> Hey, I generally don't have any trouble running soot, but am I doing
>>> something wrong here?
>>>
>>> $ ls
>>> Game.java  SearchGame.java  sootOutput  TransGame.java
>>>
>>> $ java soot.Main -O -cp . -pp -ast-metrics -app SearchGame
>>> Soot started on Sun Mar 22 18:02:28 EDT 2009
>>> Error reading in dictionary file(s)
>>> Exception in thread "main" java.lang.NullPointerException
>>>        at soot.toolkits.astmetrics.ASTMetric.execute(ASTMetric.java:82)
>>>        at soot.toolkits.astmetrics.ComputeASTMetrics.apply(ComputeASTMetrics.java:58)
>>>        at soot.JavaClassSource.resolve(JavaClassSource.java:66)
>>>        at soot.SootResolver.bringToHierarchy(SootResolver.java:184)
>>>        at soot.SootResolver.bringToSignatures(SootResolver.java:209)
>>>        at soot.SootResolver.processResolveWorklist(SootResolver.java:139)
>>>        at soot.SootResolver.resolveClass(SootResolver.java:124)
>>>        at soot.Scene.loadClass(Scene.java:390)
>>>        at soot.Scene.loadClassAndSupport(Scene.java:375)
>>>        at soot.Scene.loadNecessaryClass(Scene.java:929)
>>>        at soot.Scene.loadNecessaryClasses(Scene.java:943)
>>>        at soot.Main.run(Main.java:169)
>>>        at soot.Main.main(Main.java:145)
>>>
>>> I've tried using -ast-metrics on its own and in many combinations with
>>> other soot options and the result is always the same; I've found
>>> minimal documentation about it.
>>>
>>> Thanks,
>>> Maja
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>
>>
>>
>>
>> --
>> Eric Bodden
>> Sable Research Group, McGill University
>> Montréal, Québec, Canada
>>
>



-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada


More information about the Soot-list mailing list