[Soot-list] Newbie question regarding ExceptionalUnitGraph

Alvin Yan feiya200 at cs.uregina.ca
Fri Jan 11 16:45:49 EST 2008


Hello,

I wanted to use Soot to generate CFG with exception support. So I did this:

UnitGraph graph = new ExceptionalUnitGraph(b);
System.out.println(graph.toString());

But I got the following error:
<test.Test: void <init>()>
java.lang.NullPointerException
	at soot.AnySubType.v(AnySubType.java:44)
	at 
soot.toolkits.exceptions.ThrowableSet$Manager.<init>(ThrowableSet.java:239)
	at 
soot.Singletons.soot_toolkits_exceptions_ThrowableSet_Manager(Singletons.java:765)
	at soot.toolkits.exceptions.ThrowableSet$Manager.v(ThrowableSet.java:274)
	at 
soot.toolkits.exceptions.PedanticThrowAnalysis.mightThrow(PedanticThrowAnalysis.java:68)
	at 
soot.toolkits.graph.ExceptionalUnitGraph.getExceptionDests(ExceptionalUnitGraph.java:803)
	at 
soot.toolkits.graph.ExceptionalUnitGraph.toString(ExceptionalUnitGraph.java:918)
	at test.TestSoot.main(TestSoot.java:39)


And I traced up, found out

resolveClassErrorSet.add(AnySubType.v(Scene.v().getRefType("java.lang.ClassFormatError")));

	at 
soot.toolkits.exceptions.ThrowableSet$Manager.<init>(ThrowableSet.java:239)

might be the problem. Any experiences why this is happening?


Alvin Yan
 



More information about the Soot-list mailing list