Problem 2338

Summary: executable crashes when running included macros; corrupt Root files
Product: Examples/Advanced Reporter: Daren Sawkey <daren.sawkey>
Component: underground_physicsAssignee: alexander.howard
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 10.7   
Hardware: All   
OS: All   

Description Daren Sawkey 2021-02-24 17:16:31 CET
Three distinct problems, detailed below. Note that the failing macros are not included in ctest. Didn't work in 10.6 either.


==============================================
1. macros gamma*.mac
==============================================
Cannot read generated root file.

root [1] Error in <TFile::ReadBuffer>: error reading all requested bytes from file gamma_low_t2.root, got 176 of 300
Error in <TFile::Init>: gamma_low_t2.root failed to read the file type data.


==============================================
2. macro ambe_spectrum.mac: 
==============================================
Crash with error:

/gps/type Surface
***** COMMAND NOT FOUND </gps/type Surface> *****

***** Batch is interrupted!! *****

==============================================
3. macros alpha.mac, alpha_1000.mac, alpha_low.mac. 
==============================================
Crashes with backtrace:

#0  0x00007ffff50bc793 in G4VEmModel::IsActive (this=0x0, kinEnergy=0)                                                                                                                                                 
    at /usr/local/geant4/geant4-dev/source/processes/electromagnetic/utils/include/G4VEmModel.hh:787                                                                                                                   
#1  0x00007ffff51813ac in G4VEnergyLossProcess::AlongStepGetPhysicalInteractionLength (                                                                                                                                
    this=0x7fffe05b9080, selection=0x7fffe004096c)                                                                                                                                                                     
    at /usr/local/geant4/geant4-dev/source/processes/electromagnetic/utils/src/G4VEnergyLossProcess.cc:1029                                                                                                            
#2  0x00007ffff697248c in G4VProcess::AlongStepGPIL (this=0x7fffe05b9080, track=...,                                                                                                                                   
    previousStepSize=0, currentMinimumStep=0.14999040130743516,                                                                                                                                                        
    proposedSafety=@0x7fffee7e60a8: 1.7976931348623157e+308, selection=0x7fffe004096c)                                                                                                                                 
    at /usr/local/geant4/geant4-dev/source/processes/management/include/G4VProcess.hh:467                                                                                                                              
#3  0x00007ffff69709b2 in G4SteppingManager::DefinePhysicalStepLength (this=0x7fffe00407e0)                                                                                                                            
    at /usr/local/geant4/geant4-dev/source/tracking/src/G4SteppingManager2.cc:220                                                                                                                                      
#4  0x00007ffff696d583 in G4SteppingManager::Stepping (this=0x7fffe00407e0)                                                                                                                                            
    at /usr/local/geant4/geant4-dev/source/tracking/src/G4SteppingManager.cc:193
Comment 1 alexander.howard 2023-11-17 01:00:57 CET
This should now be fixed in DMX-V11-01-01 and included in release 11.2

1) Solved by introducing ntuple merging - removes the single thread root files at the end of the run.

2) Obsolete commands have been replaced with the correct ones.

3) Appears to be working in Geant4 since v11.0, so I think it was a broader issue than with this example. I didn't change anything. I could see the error with 10.7, but not afterwards.

Thanks a lot for highlighting these issues!!