Problem 1471

Summary: zero division G4MuPairProductionModel::ComputeMicroscopicCrossSection
Product: Geant4 Reporter: Thomas Kittelmann <thomas.kittelmann>
Component: processes/electromagneticAssignee: Vladimir.Ivantchenko
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: 9.6   
Hardware: PC   
OS: Linux   
Attachments: Fixed file
Fixed file
Fixed file

Description Thomas Kittelmann 2013-05-22 14:04:00 CEST
In 4.9.6.p01 I am getting an FPE in G4MuPairProductionModel::ComputeMicroscopicCrossSection in the line:

Program received signal SIGFPE, Arithmetic exception.
0xb5e1274b in G4MuPairProductionModel::ComputeMicroscopicCrossSection (this=0xa4c1520, tkin=1425.102670303, Z=6, cut=255.12998553106391)
    at /home/tkittel/Downloads/geant4.9.6.p01.src/source/processes/electromagnetic/muons/src/G4MuPairProductionModel.cc:256
256       G4double hhh = (bbb-aaa)/G4double(kkk);

Looking in the code, I see no protection against the case where kkk==0, so probably this should be added.

Cheers,
Thomas
Comment 1 Gabriele Cosmo 2013-05-24 17:41:06 CEST
Thanks. The fix is now included in release 9.6.p02.
Comment 2 Thomas Kittelmann 2013-05-29 08:59:54 CEST
I get a crash again in 4.9.6.p02. In fact, I see the new line

  else if (kkk < 1) { kkk = 1; }

only in G4MuPairProductionModel::ComputMuPairLoss but not in G4MuPairProductionModel::ComputeMicroscopicCrossSection.

I assume it is OK to reopen this bug.

Cheers,
Thomas
Comment 3 Vladimir.Ivantchenko 2013-05-29 11:23:29 CEST
Created attachment 216 [details]
Fixed file
Comment 4 Vladimir.Ivantchenko 2013-05-29 11:24:09 CEST
Created attachment 217 [details]
Fixed file
Comment 5 Vladimir.Ivantchenko 2013-05-29 11:26:39 CEST
Created attachment 218 [details]
Fixed file
Comment 6 Vladimir.Ivantchenko 2013-05-29 11:30:30 CEST
Hello Thomas,

Thank you for the prompt check of the patch. Sorry for incomplete fix - it was in the last day before patch02 was out. Now the full fix is done - you can take files from the attachment to the bug report. Publically these fixes will be available in June version.

VI
Comment 7 Thomas Kittelmann 2013-05-29 11:32:31 CEST
Great, many thanks for the fast fix!

Cheers,
Thomas
Comment 8 Thomas Kittelmann 2013-08-15 08:27:09 CEST
Thanks again for the fix, but we are still waiting for the June version.

Do you know when 4.9.6.p03 will come out with this fix? Currently 4.9.6.p02 does not work for us without hacks due to this bug, 4.9.6.p01 has another issue with certain extruded solids we use, and moving to 10.0 when it comes out sounds like too big a step with other issues likely to crop up.

We are really hunting for something stable and without this bug :-)