Created attachment 742 [details] Patched version of G4VRestDiscreteProcess.cc If I compile geant4.10.07-p03 with floating point exceptions enabled the code throws a SIGFPE inside the G4VRestDiscreteProcess:AtRestGetPhysicalInteractionLength method. The SIGFPE is caused when simulating particles (such as electrons) where the variable currentInteractionLength=DBL_MAX. The line (return theNumberOfInteractionLengthLeft* currentInteractionLength) causes an overflow if theNumberOfInteractionLengthLeft > 1 which results in the SIGFPE. To fix this I added a check on the currentInteractionLength and theNumberOfInteractionLengthLeft variables to see if their product will cause an overflow. In the case where they do overflow the function returns DBL_MAX, otherwise the calculation proceeds as normal. I have attached a patched version of the code to this message
Hello, Thanks for the report. Before trying to introduce a fix it is necessary to know what Physics List is used. Electrons are main part of any simulation. Why in this application such crash is seen but not in any other? VI
Hi,
Hi, We use a custom physics list for electron simulations the processes we use are G4eMultipleScattering, G4eIonisation and G4eBremsstrahlung Thanks, Mark
Hello, I have an assumption that in your custom Physics List you register ionisation or bremsstrahlung AtRest. These processes cannot work at rest. Two alternative suggesting: - review your custom physics configuration and disable all processes at rest, except positron annihilation; - use Physics Lists from Geant4 distribution. VI
hello, the bug is fixed and the fix will be available with the next public Geant4 release in December. It may be back-ported to previous releases if extra patches will be done. VI