Skip to content

Commit a61827d

Browse files
committed
EMCAL: initialise the MC kinematics reader pointer in the digitizer
DigitizerSpec::mcReader had no initialiser, and run() only creates the reader when the pointer is null. When the memory the (large) spec is allocated in is not zeroed, the reader is never created and getMCEventHeader() dereferences garbage, crashing the digitizer at the first collision accepted by the CTP minimum-bias trigger. Seen on macOS in about one run in three; Linux likely hides it because large allocations come from fresh zeroed pages. Also initialise mCTPConfig, which follows the same pattern.
1 parent 92368c4 commit a61827d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Detectors/EMCAL/workflow/include/EMCALWorkflow/EMCALDigitizerSpec.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ class DigitizerSpec final : public o2::base::BaseDPLDigitizer, public o2::framew
8989
std::shared_ptr<CalibLoader> mCalibHandler; ///< Handler of calibration objects
9090
std::vector<Hit> mHits; ///< Vector with input hits
9191
std::vector<TChain*> mSimChains;
92-
o2::ctp::CTPConfiguration* mCTPConfig; ///< CTP configuration
93-
o2::detectors::DetID::mask_t mDetMask; ///< to keep track whether FT0 and FV0 are included
94-
o2::steer::MCKinematicsReader* mcReader; ///< reader to access MC collision information
92+
o2::ctp::CTPConfiguration* mCTPConfig = nullptr; ///< CTP configuration
93+
o2::detectors::DetID::mask_t mDetMask; ///< to keep track whether FT0 and FV0 are included
94+
o2::steer::MCKinematicsReader* mcReader = nullptr; ///< reader to access MC collision information
9595

9696
DigitizerTRU mDigitizerTRU; ///< Digitizer object TRU
9797
o2::emcal::SDigitizer mSumDigitizerTRU; ///< Summed digitizer TRU

0 commit comments

Comments
 (0)