Hello all! I have simle bug that leed to crash.. no comments.. in fuction: G4Element * G4HadronicProcess::ChooseAandZ( const G4DynamicParticle *aParticle, const G4Material *aMaterial ) { ... G4double random = G4UniformRand(); for( i=0; i < numberOfElements; ++i ) { ... for (i=0; i<theIso.GetNumberOfIsotopes(localZ); i++) { } for(i=0; i<theIso.GetNumberOfIsotopes(localZ); i++) { } ... targetNucleus.SetParameters(currentN, currentZ); return (*theElementVector)[i]; ... } ... } variable "i" change its value many times inside of inner cycles and as a results G4 crash when the function try to return value with "i" outside of availbale range!!!! Please fix this strange code. Viacheslav Porosev
This problem has been fixed in the 8.3 release of Geant4, which will be available in a few days.