[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception when subject class extends a library class



On Thu, Jul 22, 2004 at 05:42:03PM +0100, Neil Walkinshaw wrote:
> Hi,
> 
> I run into problems trying to build a callgraph when the class I am 
> analysing extends a library method. Soot throws the following exception:
> 
> ...
> [addStmtNodes]     Producing naive Jimple...
> java.lang.RuntimeException: Class jsdg.JSDG doesn't have method 
> addNode([java.lang.Object]) : void; failed to resolve in superclasses 
> and interfaces

This indicates that their was a reference (call) to that method, the
method was not foung in jsdg.JSDG, and performing the resolution
procedure described in the JVM spec didn't find the method. Since you
say that JSDG extends HashMutableDirectedGraph, which does have such a
method, the possible causes I can think of is that either Soot is
picking up some modified HashMutableDirectedGraph somewhere on your
classpath, or that perhaps JSDG is missing its extends clause. If
neither of these is the case, if you can send me a copy of the JSDG
class, I'll have a look into the problem.

> loadClassAndSupport method, it loads fine. When I check to see that its 
> superclass has been loaded into the scene, it has. When trying with 
> phantom classes switched to true, the following exception occurs instead:
> 
> ...
> java.lang.NullPointerException
> at soot.coffi.Util.isValidJimpleName(Util.java:1132)
> at soot.coffi.CFG.jimplify(CFG.java:1100)
> at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:98)
> at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:79)
> at soot.SootMethod.retrieveActiveBody(SootMethod.java:274)

I've never seen anything like this before. On the trunk, soot.coffi.Util
only has 786 lines. Which version of Soot are you using?

Ondrej