Skip to content

Fix segfault on exit of macros: unpacking and digitization

  1. Deletion of source pointer already present at l.145 of the FairRootManager (source), so we should not do it ourselves in CbmDigitization
  2. There is a problem with ownership and pointer deletion of ROOT objects attached to the ROOT global lists when shared pointers are used: if the owners count does not reach 0 before the end of the root session, ROOT "cleans out" the objects in its lists before the end of scope, so any destructor trying to be nice an clean memory it allocated for such objects and never made public will trigger a segmentation violation
    • List of ParAsic in the StsUnpackConfig class sub-members, due to the internal TF1
    • List of histograms and canvases in the UnpackMonitor classes of STS, MUCH, TRD, TOF and RICH

For the TF1 a trick was found to tell ROOT to ignore them.

Edited by Pierre-Alain Loizeau

Merge request reports