CalHelixFinder_module.cc:460:
void CalHelixFinder::initHelixSeed(HelixSeed& HelSeed, CalHelixFinderData& HfResult) {
HelixTraj* hel = HfResult.helix(); // line 458 — pointer return, NOT null-checked
double helixRadius = 1./fabs(hel->omega()); // line 460 — segfault here when hel == nullptr
...
HfResult.helix() can return nullptr (it's a raw pointer), but initHelixSeed dereferences it on the very next line with no guard. On certain cosmic events the upstream calorimeter helix-finding fails and returns a null helix candidate, then
hel->omega() blows up.
Crash signature in summary:
- Fcl: Production/JobConfig/recoMC/{OnSpill,OffSpill}.fcl (any chain that includes CalHelixFinder)
- Module: mu2e::CalHelixFinder (CalPatRec package)
- Function: initHelixSeed, line 460 of Offline/CalPatRec/src/CalHelixFinder_module.cc
- Cause: missing null check before dereferencing the result of HfResult.helix()
- Trigger: cosmic events where the calo-seeded helix search returns no valid candidate
- Reproducible on: dig.mu2e.CosmicCRYAllMix1BBTriggered.MDC2025af_best_v1_1.001430_00001075.art index 1461, crashes at record 17–32 (~10 s wall) — and dig.mu2e.CosmicSignalOffSpillTriggered.MDC2025ae_best_v1_3.001430_00002687.art index 160
between records 8193–16385 (~25 min wall)
- Offline version: v13_09_00 (the version shipped in Musings/SimJob/MDC2025am)
- Build: al9-prof-e29-p094 from 2026-04-27
Two-line fix in upstream Offline:
HelixTraj* hel = HfResult.helix();
if (!hel) return; // or set HelSeed status flag and return
CalHelixFinder_module.cc:460:
void CalHelixFinder::initHelixSeed(HelixSeed& HelSeed, CalHelixFinderData& HfResult) {
HelixTraj* hel = HfResult.helix(); // line 458 — pointer return, NOT null-checked
double helixRadius = 1./fabs(hel->omega()); // line 460 — segfault here when hel == nullptr
...
HfResult.helix() can return nullptr (it's a raw pointer), but initHelixSeed dereferences it on the very next line with no guard. On certain cosmic events the upstream calorimeter helix-finding fails and returns a null helix candidate, then
hel->omega() blows up.
Crash signature in summary:
between records 8193–16385 (~25 min wall)
Two-line fix in upstream Offline:
HelixTraj* hel = HfResult.helix();
if (!hel) return; // or set HelSeed status flag and return