qiyitang71 / jpf-visual

JPF Visual
1 stars 1 forks source link

IndexOutOfBoundsException in TraceData #49

Open qiyitang71 opened 5 years ago

qiyitang71 commented 5 years ago

Original report by Qiyi Tang (GitHub: qiyitang71).


In the TraceData

private void processChoiceGenerator(ChoiceGenerator<?> cg, int prevThreadIdx, int pi, int height, ThreadInfo ti) {
    // thread start/join highlight
    if (cg.getId() == "START" || cg.getId() == "JOIN") {
        if (lineTable.get(pi).getTextLine(height - 1).isSrc()) {
            threadStartSet.add(new Pair<>(pi, height - 1));
        }
    }

height can be zero which gives rise to an IndexOutOfBoundsException.