[Soot-list] Class Hierarchy Analysis causes NullPointerException

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Dec 16 17:16:05 EST 2009


Daniel can you send us a concrete example including your command line
options that would allow us to reproduce this?

Eric

--
Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



2009/12/11 Daniel Popescu <dpopescu at usc.edu>:
> Hi all.
>
> I am trying to analyze some Java legacy systems using the Soot Eclipse
> plugin. I have been running into some problems and I hope somebody on
> the list can help me.
>
> I have been trying to create a call graph of my application using the
> Class Hierarchy Analysis. Whenever I am analyzing the Java files of my
> application, the JastAdd frontent is reporting a semantic error:
> "Semantic Error: annotation is not applicable to this kind of
> declaration". The Eclipse JDT parser and the JDK are able to parse
> these annotations.
>
> Since parsing the source code did not work for me, I was trying to
> analyze the bytecode of the classes. This bytecode-based analysis
> caused a NullPointerException in a different file.
>
> java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at ca.mcgill.sable.soot.launching.SootThread.run(SootThread.java:138)
> Caused by: java.lang.NullPointerException
>        at soot.jimple.toolkits.callgraph.Edge.hashCode(Edge.java:109)
>        at java.util.HashMap.put(HashMap.java:372)
>        at java.util.HashSet.add(HashSet.java:200)
>        at soot.jimple.toolkits.callgraph.CallGraph.addEdge(CallGraph.java:43)
>        at soot.jimple.toolkits.callgraph.ContextInsensitiveContextManager.addVirtualEdge(ContextInsensitiveContextManager.java:39)
>        at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.addType(OnFlyCallGraphBuilder.java:111)
>        at soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:94)
>        at soot.jimple.toolkits.callgraph.CHATransformer.internalTransform(CHATransformer.java:43)
>        at soot.SceneTransformer.transform(SceneTransformer.java:39)
>
> How could I prevent this NullPointerException?
>
> I have also noticed that Soot creates the call graph from classes that
> I would like to ignore (e.g. sun.net.spi.DefaultProxySelector )
> although the non-application mode is selected. I would have thought
> that only the files of the project and the process directory would be
> analyzed. My assumption seems to be wrong. How can I set classes as
> library classes in the non-application mode?
>
> I appreciate your help.
> Daniel
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


More information about the Soot-list mailing list