<div dir="ltr">As the subjects states, I&#39;m receiving a &quot;ConcurrentModificationException&quot; when I run SPARK with the vta option set to true.<div><br></div><div>My setup is simple, I&#39;m just pushing a number of classes into soot and build a callgraph.</div><div><br></div><div>My args: <span style="color:rgb(169,183,198);font-family:Menlo;font-size:12pt;background-color:rgb(43,43,43)">-p cg.spark on -p cg.spark vta:true -w -cp /path/to/custom/java/classes/:/path/to/other/directory/:. -f J -allow-phantom-refs</span></div><div><span style="color:rgb(169,183,198);font-family:Menlo;font-size:12pt;background-color:rgb(43,43,43)"><br></span></div>I just iterate a list of classes that are to be added, add them, add the custom entry points, and ask for a call graph:<div><br></div><div><pre style="color:rgb(169,183,198);font-family:Menlo;font-size:12pt;background-color:rgb(43,43,43)"><span style="color:rgb(204,120,50)">for</span>(Manifest m : <span style="color:rgb(152,118,170)">mManifest</span>) {<br>    System.<span style="color:rgb(152,118,170);font-style:italic">out</span>.println(m.toString())<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)">    if</span>(stringToType(m.<span style="color:rgb(152,118,170)">type</span>) != CreationType.<span style="color:rgb(152,118,170);font-style:italic">STATIC</span>) {<br>        sootClass = Scene.<span style="font-style:italic">v</span>().forceResolve(m.<span style="color:rgb(152,118,170)">className</span><span style="color:rgb(204,120,50)">, </span>SootClass.<span style="color:rgb(152,118,170);font-style:italic">BODIES</span>)<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)">    </span>} <span style="color:rgb(204,120,50)">else </span>{<br>        sootClass = Scene.<span style="font-style:italic">v</span>().forceResolve(m.<span style="color:rgb(152,118,170)">path </span>+ <span style="color:rgb(106,135,89)">&quot;.&quot; </span>+ m.<span style="color:rgb(152,118,170)">className</span><span style="color:rgb(204,120,50)">, </span>SootClass.<span style="color:rgb(152,118,170);font-style:italic">BODIES</span>)<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)">    </span>}<br>    entryPoints.add(sootClass.getMethodByName(m.<span style="color:rgb(152,118,170)">method</span>))<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)">    </span>sootClass.setApplicationClass()<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)">    </span>processed++<span style="color:rgb(204,120,50)">;<br></span>}<br><br>System.<span style="color:rgb(152,118,170);font-style:italic">out</span>.println(<span style="color:rgb(106,135,89)">&quot;Processed: &quot; </span>+ Integer.<span style="font-style:italic">toString</span>(processed))<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)"><br></span>Scene.<span style="font-style:italic">v</span>().loadNecessaryClasses()<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)"><br></span>Scene.<span style="font-style:italic">v</span>().setEntryPoints(entryPoints)<span style="color:rgb(204,120,50)">;<br></span>PackManager.<span style="font-style:italic">v</span>().runPacks()<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)"><br></span><span style="color:rgb(128,128,128)">// Build the callgraph!<br></span>CallGraph callGraph = Scene.<span style="font-style:italic">v</span>().getCallGraph()<span style="color:rgb(204,120,50)">;<br></span></pre></div></div>