Problem 1471 - zero division G4MuPairProductionModel::ComputeMicroscopicCrossSection
Summary: zero division G4MuPairProductionModel::ComputeMicroscopicCrossSection
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: 9.6
Hardware: PC Linux
: P5 normal
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2013-05-22 14:04 CEST by Thomas Kittelmann
Modified: 2013-08-15 08:27 CEST (History)
0 users

See Also:


Attachments
Fixed file (15.71 KB, text/plain)
2013-05-29 11:23 CEST, Vladimir.Ivantchenko
Details
Fixed file (15.71 KB, text/plain)
2013-05-29 11:24 CEST, Vladimir.Ivantchenko
Details
Fixed file (23.96 KB, text/plain)
2013-05-29 11:26 CEST, Vladimir.Ivantchenko
Details

Note You need to log in before you can comment on or make changes to this problem.
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 :-)