Hi, I already posted this error in the user forum (#114 in the hadronic section) and Hans-Peter advised me to place it here. So I'll just copy my report there: " I'm trying to get information about the target isotope in a low energy inelastic scattering using the neutron HP model. For that I cast the pointer to the process as a G4HadronicProcess pointer and then I create a pointer to the G4IsoParticleChange using the GetIsotopeProductionInfo(). This is done in my sensitive volume when I analyse the secondaries created by the hit (I have a pointer to the TrackingManager in my UserTrackInformation). It works fine, and I can access the info on the Z and N that I'm interested in. The problem is that I get a segmentation fault a few tracks after... Or a few events after... it depends if I create the pointer to G4IsoParticleChange inside or outside the secondaries analysis. But anyways, I allways get a segmentation fault if I create the pointer... I think this is a memory management problem, but I don't know how to solve it... Thanks in advance Alex P.S.: I'm using Geant4.5.2 and G4NDL3.7 " Hans-Peter sugested it might be a problem of me deleting the pointer to the object, but that is not the case... Thanks in advance. Best regards Alex
Hi, I finally managed to get the code to link, and tried running. I reproduce the problem in so far, as there is an exception thrown. Unfortunately, in my case, this happens independent of the retrieval of isotope production info. To make the case worse, it also crashes, when just running the geometry check UI command: Idle> /geometry/test/run Abort I am somewhat at a loss in this. Forward to Gabriele, who may be better able to help. Many greetings, Hans-Peter.
Where can I find the code ? It doesn't really look related to geometry .....
Hi, Hans-Peter is right. I also tried to run /geometry/test/run and got an Abort. But except for that and the segmentation fault that I described in my mail, everything seems to work fine... And it doesn't crash if I remove the lines in wich I create create the G4Nucleus object for the isotope information... (lines 132-137 of neutraoSensitiveXenon.cc). You can find the code at www-lip.fis.uc.pt/~alex/geant4 Best regards Alex
The geometry test check crashes due to a logic error in a special case where the test-line is coincident with the inner surface of a sphere shell (good test case!). This problem will be fixed soon in the geometry-verification tool. However, tracking is correct and the user's geometry appears correctly defined. The problem reported though seems specific to hadronic physics, in particular, the crash is originated from G4NeutronHPElasticFS::ApplyYourself() when looking for a ion in the G4IonTable and in the dynamic creation of a new one. As such, I hand this over again to Hans-Peter.
This one came yup elsewhere as well, and I managed to trace it there. the fix is included in geant4 6.1. Many greetings, Hans-Peter.