Skip to content

IndexOutOfBoundsException in ALERT Track constructor #1182

Description

@mathieuouillon

The ALERT reconstruction engine crashes with an IndexOutOfBoundsException when processing certain events. The error occurs in Track.<init> at line 61 of Track.java, called from ALERTEngine.processDataEvent at line 349 of ALERTEngine.java. It appears the code attempts to access index 0 of an empty list without checking if the list is populated.

Stack Trace

2026-04-05 12:35:59.690: Error in 129.57.138.234%7440_java:clas12-3:ALERT (ID: 56909):
Error processing input event

    java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
        at java.base/java.util.Objects.checkIndex(Objects.java:385)
        at java.base/java.util.ArrayList.get(ArrayList.java:427)
        at org.jlab.rec.ahdc.Track.Track.<init>(Track.java:61)
        at org.jlab.service.alert.ALERTEngine.processDataEvent(ALERTEngine.java:349)
        at org.jlab.clas.reco.ReconstructionEngine.filterEvent(ReconstructionEngine.java:368)
        at org.jlab.clas.reco.ReconstructionEngine.execute(ReconstructionEngine.java:407)
        at org.jlab.clara.sys.ServiceEngine.executeEngine(ServiceEngine.java:227)
        at org.jlab.clara.sys.ServiceEngine.execute(ServiceEngine.java:153)
        at org.jlab.clara.sys.Service.lambda$execute$2(Service.java:178)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)

Environment

  • CJ 13.8.2
  • timestamp: 04/04/2026-07:00:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions