Adding G4AnalysisManager::Instance()->GetNofNtuples(); in RunAction::RunAction() of example B4/B4b leads to an invalid pointer reference, therefore a segfault. This looks like a bug to me.
Hello, There was indeed missing a protection against nullptr; the bug is now fixed in the Geant4 development version and the fix is also proposed for the next patch to Geant4 11. Best regards,