Skip to content

NullPointerException in ATOFHit.convertTdcToTime — timeOffsets array is null #1183

Closed
0 of 1 issue completed

Description

@mathieuouillon

The ATOF reconstruction engine crashes with a NullPointerException when the timeOffsets array has not been initialized. The error occurs in ATOFHit.convertTdcToTime at line 204, called during hit construction (ATOFHit.<init> line 417). This suggests the calibration constants for ATOF time offsets were not loaded from CCDB, or the relevant table/variation is missing for the current run.

Stack Trace

java.lang.NullPointerException: Cannot load from double array because "timeOffsets" is null
    at org.jlab.rec.atof.hit.ATOFHit.convertTdcToTime(ATOFHit.java:204)
    at org.jlab.rec.atof.hit.ATOFHit.<init>(ATOFHit.java:417)
    at org.jlab.rec.atof.hit.HitFinder.findHits(HitFinder.java:92)
    at org.jlab.service.atof.ATOFEngine.processDataEvent(ATOFEngine.java:106)
    at org.jlab.clas.reco.ReconstructionEngine.filterEvent(ReconstructionEngine.java:368)
    at org.jlab.clas.reco.ReconstructionEngine.execute(ReconstructionEngine.java:407)

Environment

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

Activity

  1. mathieuouillon commented on Apr 7, 2026

    @mathieuouillon
    CollaboratorAuthor

    The branch https://github.com/JeffersonLab/coatjava/tree/iss_1183 fixes the issue by setting the number of index variables correctly.
    But other improvements are needed: #1197
    I also want to split the CalibrationConstantsLoader class into two, one for AHDC and one for ATOF

  2. whit2333 commented on Apr 8, 2026

    @whit2333
    Collaborator

    @mathieuouillon Where is the PR fix?

  3. mathieuouillon commented on Apr 8, 2026

    @mathieuouillon
    CollaboratorAuthor

    @mathieuouillon Where is the PR fix?

    The branch https://github.com/JeffersonLab/coatjava/tree/iss_1183 fixes the issue, but as I said previously, I still want to work on that branch to split the CalibrationConstantLoader into two. I think we have other issues with that code, only the constants associated with the run number of the first event meet by an engine will be loaded, and often the first event in a data fill is 0. We may also have other multithreading issues.

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