Hi, Ive been trying to make a new simulation to extract some information from Hadr04 with a fresh Geant4.11 install (focusing on neutrons and opticalphotons). I removed the H1 histograms since I do not require them, but when I only attempt to save ntuples I get this error saying that I am saying to a null pointer (using lldb)
========================================================================================
--> G4TaskRunManager::CreateAndStartWorkers() --> Creating 1 tasks with 1 events/task...
========================================================================================
Adding task 0 to task-group...
G4WT2 > ### Run 0 starts on worker thread 2.
G4WT2 > Photon!
G4WT2 > EVENTID 0 TRACKID 999 MOM (1.945e-07,7.63403e-07,1.02818e-06) POS (224.647,884.317,1190.6) ENERGY - 1.29529e-06 TIME 6.58153 PARENT opticalphoton
G4WT2 > Copying Photons...
Process 93946 stopped
* thread #5, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x000000010002003a Hadr04`SteppingAction::UserSteppingAction(G4Step const*) [inlined] G4VAnalysisManager::FillNtupleDColumn(this=0x0000000105fc8030, ntupleId=1, columnId=1, value=224.64703205946708) at G4VAnalysisManager.icc:143:27 [opt]
140 G4bool G4VAnalysisManager::FillNtupleDColumn(G4int ntupleId, G4int columnId,
141 G4double value)
142 {
-> 143 return fVNtupleManager->FillNtupleDColumn(ntupleId, columnId, value);
144 }
145
146 //_____________________________________________________________________________
Target 0: (Hadr04) stopped.
warning: Hadr04 was compiled with optimization - stepping may behave oddly; variables may not be available.
If I only print the values out with multithreading turned on I manage to run the program with no problems - now I just got to get them saved to root files!
I notice also that the program mentions
========================================================================================
--> G4TaskRunManager::CreateAndStartWorkers() --> Creating 1 tasks with 1 events/task...
========================================================================================
Yet there appear to be multiple workers if I run with the default
./Hadr04 <macro> <nthreads>
I guess this could be a symptom of my problem
RunAction.cc (4.2 KB)
SteppingAction.cc (7.9 KB)
HistoManager.cc (8.2 KB)
Thanks for any help!
_Geant4 Version:_4.11.0 (Multithreaded)
_Operating System:_Mac OS Monterey
_Compiler/Version:_Apple clang version 14.0.0
_CMake Version:_3.28.1