Bug #1580

Writing scifi noise creates seg fault

Added by Heidt, Christopher over 9 years ago. Updated over 9 years ago.

Target version:
Start date:
31 October 2014
Due date:
% Done:


Estimated time:
New Issue


It appears that writing data into the scifi noise data class will cause a seg fault. I'm running the current tracker devel version, and when I add the mapper SciFiTrackerMCNoise to the running python script, it will run, along with the rest of the mappers, but when all the scripts have run it will crash. When object SciFiNoise is empty everything appears to run fine. Attached are the relevant files. My gut reaction is that the problem is something to do with how the spill information is passed, but I don't know, I could really use some help hunting this down.


MapCppTrackerMCDigitization.hh (3.67 KB) MapCppTrackerMCDigitization.hh Heidt, Christopher, 31 October 2014 16:18 (11 KB) Heidt, Christopher, 31 October 2014 16:18 (1.61 KB) Heidt, Christopher, 31 October 2014 16:18

Updated by Heidt, Christopher over 9 years ago

I think the problem is in the destructor. If SciFiNoiseHits != NULL then at the end of the spill it will be set to NULL for the next spill, I think. Anway when the Spill object tries to delete SciFiNoiseHit the seg fault occurs. I don't know why, it seems like a pretty straight forward thing to do, but I'm going to keep on looking around.


Updated by Heidt, Christopher over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Updated by Rogers, Chris over 9 years ago

For the record - the issue was that tracker initialised a single std::vector of noise hits and then allocated this using MCEvent::SetNoiseHits to several MCEvents. When the MCEvents were deleted, the std::vector was deleted several times - leading to double free and memory corruption, resulting in a segmentation fault.

Also available in: Atom PDF