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

Re: possible bug: ConcurrentModificationException with spark andsmall test-program




On Wed, 2 Jun 2004, Helge Jensen wrote:

> On http://svn.sable.mcgill.ca/soot/soot/trunk -r1497, With the attached
> test-program: A.java.
>
> When invoking "soot -w -p cg enabled -p wjtp enabled -app A -p cg
> verbose:on -p jb use-original-names:true -p cg.spark on", I get a
> "ConcurrentModificationException" for cIt.hasNext() in
> ContextInsensitiveBuilder.build() line 90:
>
>          for( Iterator cIt = Scene.v().getClasses().iterator();
> cIt.hasNext(); ) {
>              final SootClass c = (SootClass) cIt.next();
> 	    handleClass( c );
> 	}
>

Try calling snapshotIterator() instead of iterator(). The latter returns
an immutable iterator, I believe.

Kelvin Ku