Problem 2518 - Null pointer dereference in G4AnalysisManager::GetNofNtuples()
Summary: Null pointer dereference in G4AnalysisManager::GetNofNtuples()
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: analysis (show other problems)
Version: 11.0
Hardware: All Linux
: P4 major
Assignee: Ivana Hrivnacova
URL:
Depends on:
Blocks:
 
Reported: 2022-11-11 19:11 CET by Luigi Pertoldi
Modified: 2022-11-14 10:08 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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,