Closed f1n4rf1n closed 10 years ago
Can you please provide a full stack trace? Thanks
The problem arises because of caching in the BaseEntryPointCreator class. You first call runInfoflow() which creates a dummy main method that it needs as an entry point for the callgraph used in the data flow analysis. Then, you reset Soot and use the same entry point creator again in a new instance of Soot. The caches in the entry point creator now however contain outdated values which are no longer valid in the new Soot instance.
The "official" way around this problem would be to do it all in the same Soot run if possible. You can also call the overload of runInfoflow() that takes two parameters. In this case, the second parameter is an interface implementing a callback method which FlowDroid invokes once the data flow computation is done. Inside this method, the callgraph used by FlowDroid is still alive, so you don't even need to run your own Soot instance, but can directly access Scene.v().getCallgraph() or access any Soot objects you may like. You can take the callback handler as a special "phase".
I'll close that issue since it has not received any further attention for more than two weeks. If the problem persists, feel free to re-open it.
This error pops up when trying to do a infoflow analysis first and then using soot afterwards (see code). When I move the InfoflowResults res = app.runInfoflow() to the second position right after Scene.v().runNecessaryClasses(); then the error doesn't pops up and it seems that everything works as desired.
Edit: Here is the Stacktrace: