Problem 1550 - exampleRE05 exampleRE05.in G4FTFAnnihilation.cc:868 CandidatsN == 9 subscript check
Summary: exampleRE05 exampleRE05.in G4FTFAnnihilation.cc:868 CandidatsN == 9 subscript...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/parton_string/diffraction (show other problems)
Version: 10.0
Hardware: PC Linux
: P5 normal
Assignee: Alberto.Ribon
URL:
Depends on:
Blocks:
 
Reported: 2013-12-22 10:11 CET by Vittorio Zecca
Modified: 2014-07-01 12:21 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Vittorio Zecca 2013-12-22 10:11:19 CET
Running exampleRE05 exampleRE05.in I get a subscript check in
G4FTFAnnihilation.cc:868 because the subscript CandidatsN is nine, 
thus accessing the array CandAQ beyond its boundary.
Comment 1 Alberto.Ribon 2014-05-23 12:04:45 CEST
The problem has been studied and reproduced. It was indeed a bug in G4FTFAnnihilation which can affect the simulation of antiproton-proton and antineutron-neutron annihilation, both in-flight and at rest.
The problem will be fixed in the beta release G4 10.1.beta, expected by the end of June.
Thanks a lot for reporting this bug!
Comment 2 Vittorio Zecca 2014-06-21 18:55:36 CEST
Are you sure this is fixed in geant4 version 10 with patch?
After installing it I get the same subscript check
in G4FTFAnnihilation.cc:868
"if ( iAQ1 == 2  &&  iAQ2 == 0 ) { assert(CandidatsN < 9),CandAQ[CandidatsN] = 1; }"
here I added an assert to detect the bug.
The code fails
exampleRE05: /home/vitti/1tb/vitti/geant4.10.00.p01/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFAnnihilation.cc:868: virtual G4bool G4FTFAnnihilation::Annihilate(G4VSplitableHadron*, G4VSplitableHadron*, G4VSplitableHadron*&, G4FTFParameters*) const: Assertion `CandidatsN < 9' failed.

Will you please double check?
Comment 3 Alberto.Ribon 2014-07-01 12:21:57 CEST
The problem has been fixed in the *second* patch of version 10, i.e. in G4 10.0.p02, whereas you are running the first, older, patch, G4 10.0.p01.