ExecFileLoader#save Error

13 views
Skip to first unread message

zhen da

unread,
Oct 8, 2023, 2:05:30 AM10/8/23
to JaCoCo and EclEmma Users
Hi, all ~ 
I encountered  a problem when I use  api  “ org.jacoco.core.tools.ExecFileLoader#save(java.io.File, boolean)” (jacoco v0.8.3). It throws an error like this:

java.lang.NullPointerException: null at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:262) at java.util.ComparableTimSort.sort(ComparableTimSort.java:207) at java.util.Arrays.sort(Arrays.java:1312) at java.util.Arrays.sort(Arrays.java:1506) at java.util.ArrayList.sort(ArrayList.java:1464) at java.util.Collections.sort(Collections.java:143) at org.jacoco.core.data.SessionInfoStore.getInfos(SessionInfoStore.java:47) at org.jacoco.core.data.SessionInfoStore.accept(SessionInfoStore.java:84) at org.jacoco.core.tools.ExecFileLoader.save(ExecFileLoader.java:90) at org.jacoco.core.tools.ExecFileLoader.save(ExecFileLoader.java:117)


Strangely, this error does not occur each time. So is there anyone can explain the reason and how can I fix it? 





Marc Hoffmann

unread,
Oct 8, 2023, 11:01:45 AM10/8/23
to JaCoCo and EclEmma Users
Hi,

this happens when a null value was added to the SessionInfoStore. Also please check your usage of the class: SessionInfoStore is not thread safe.

Regards,
-marc


--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/de8f8e65-3f98-41e0-bd82-6f047f046936n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages