Hello, The example runs without error messages using "write" parameter but it crashes using "read parameter" when macro reaches "/run/beamOn" command. The message thrown on screen is: terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check Aborted (core dumped) Regards, Zoltan
Created attachment 498 [details] fix diff
Hi, thanks for spotting that. The crash was due to the fact that for some reason two copies of the materials where being saved to the root file. To fix it, I removed the explicit pointer to the material table from ExP02GeoTree class (a helper class used to write the geometry tree + materials + elements to the root file). There was also an update needed in the selection.xml file due to some changes in the G4MaterialPropertiesTable class. You can find the diffs in the attached file. Cheers, Witek