Segmentation Fault with different Recon and Simulation geometries
In running MAUS where the simulation_geometry_filename and the reconstruction_geometry_filename differ, segmentation faults have been found to occur.
Verified by Durga using a recent release.
I believe that the BTSolenoid class stores a static list of field maps for the simulation geometry, and hands out pointers to those fields. When the reconstruction geometry is initialised, BTFieldConstructor clears the list and causes new field maps to be inserted, without taking care of the old set of pointers.
I stumbled upon a fudge-fix by commenting out line 74 in src/legacy/BeamTools/BTFieldConstructor.cc:
But I don't think that's the correct way to solve the problem.
Attached is a Valgrind output file showing where the segfault is thrown from.
No data to display