Problem 1193

Summary: Geant4.9.4.p01 crashed when running novice example N06
Product: Geant4 Reporter: randolph.moellenberg
Component: global/managementAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P5    
Version: 9.4   
Hardware: PC   
OS: Linux   
Attachments: Valgrind (tool=memcheck) results

Description randolph.moellenberg 2011-04-19 15:19:41 CEST
Created attachment 106 [details]
Valgrind (tool=memcheck) results

When the tank dimension in the novice example N06 is changed to: 
"tank_x    = tank_y    = tank_z    =  0.05*m;
bubble_x  = bubble_y  = bubble_z  =  0.005*m;"
and 4.4MeV gammas from an AmBe source are simulated, the program crashed with a segfault after about 5000 events.


In the attachment crashdetails060411.txt you see the result of a valgrind run (tool=memcheck).
The problem occurs in Geant4.9.4 and Geant4.9.4.p01, but not in Geant4.9.3.
Replacing the G4Allocator with the standard c++ allocator in the class
"G4ReferenceCountedHandle" seems to solve the problem.

I am using Ubuntu 8.04.3 LTS and gcc 4.5.0.
Comment 1 Gabriele Cosmo 2011-04-20 14:04:37 CEST
The problem cannot be reproduced with the supported systems/compilers, and have no way to test on Ubuntu, sorry. The reason for the crash can be associated to the system in use, as we don't see obvious faults associated to the custom allocator implemented in Geant4 and in use since many years.
To be noticed also that the changes made to the geometry setup of the example would also require a proper adaptation of the size of the world volume, in order for the system to generate an effective voxelisation of the setup...
Comment 2 randolph.moellenberg 2011-05-06 11:38:08 CEST
The problem seems to be connected to gcc Version.
If i use gcc 4.6.0 on Ubuntu 8.04.3 LTS, the error does not occur.
Maybe it is possible to add a comment to the Geant4 release note about this.
Comment 3 Gabriele Cosmo 2011-05-06 12:14:05 CEST
Thanks for the follow-up info.
Indeed the release notes already report the system/compiler versions which are supported or tested...
Once released, they cannot be changed.