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

Re: Strange bug related to soot.Scene



It is a known bug that Soot does weird things if you reset the Scene,
because not all the global variables that Soot uses are in the Scene.
This is something that we are fixing for 2.0. Until then, the only
reliable workaround is to not reset the Scene, and only ever run Soot
once. For applications where you need to run Soot more than once, the
solution we've been using is to start a separate java VM using
java.lang.Runtime exec(). I know that this is ugly, which is why we
are working on a fix.

Ondrej

On Wed, Feb 19, 2003 at 07:04:36PM -0000, Eric Bodden wrote:
> Hi!
> 
> I was experiencing some really strange behaviour regarding
> loadClassAnsSupport(String) and reset() in soot.Scene. Please have a
> look at the attached source file.
> 
> Whenever I invoke initialize(true) (one or multiple times) this all
> works fine: The Scene is reset and some classes (definded in
> rootClasses) are loaded to the Scene.
> 
> But whenever I first invoke initialize(true), then
> setApplicationClasses() and then again initialize(true), the program
> starts loading the first four classes and then dies with an out of
> memory error.
> 
> But this really makes no sense to me since the critical line seems to be
> line 91:
> 
> 	cl.setApplicationClass();
> 
> When I comment this line, I can reinitialize 100 times without problems.
> When I activate it, I get this strange behaviour. How can that be? If
> anyone has a clue, please tell me.
> 
> Thanks,
> Eric