Problem 2518

Summary: Null pointer dereference in G4AnalysisManager::GetNofNtuples()
Product: Geant4 Reporter: Luigi Pertoldi <gipert>
Component: analysisAssignee: Ivana Hrivnacova <ivana>
Status: RESOLVED FIXED    
Severity: major    
Priority: P4    
Version: 11.0   
Hardware: All   
OS: Linux   

Description Luigi Pertoldi 2022-11-11 19:11:38 CET
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.
Comment 1 Ivana Hrivnacova 2022-11-14 10:08:23 CET
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,