| Summary: | G4VReplica and runManager->SetGeometryToBeOptimized(false) induces a crash at exit | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | barrand |
| Component: | geometry | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
barrand
2006-04-19 05:32:35 CEST
Do you have a test application where we can analyse and reproduce the problem ? Optimisation does not apply to replicas in Geant4, as such setting on or off optimisation from the run-manager should not have any effect for replicas. From the dump reported the problem seems related to the deallocation of a replicated volume, not clear why and cannot reproduce it. Can you please verify that in your simulation you are doing the following: - using replicated volumes with replication along phi axis; - explicitely deleting at the end of the application rotation matrices assigned to any of your physical volumes. If so, try to assign to zero the pointer of the rotation matrix deleted. This should solve the problem. On replicas, rotation matrices are internally created and then destroyed automatically in the destructor, since in this case ownership is responsibility of G4PVReplica. We plan to implement in a near future a registration/deregistration mechanism for attributes associated to volumes to avoid situations of ambiguity for the ownership of pointers. Please, let us know. Then we have definitely : - phi replicas - one rotation matrix - but the rotation matrix is not deleted for the moment in the program. Anyway, I have tried by having the lonely rotation matrix as member of out DetctorConstruction class and then explicitly delete it in the destructor of this class and setting the (then member) pointer to null, but it does not seem to fix the problem. At least I still have the memory leak message on my Mac. |