| Summary: | warnings/behavior of physical,logical,region and solid stores | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Krzysztof Genser <resnegfk> |
| Component: | geometry/management | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | P4 | ||
| Version: | 10.7 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Krzysztof Genser
2021-06-04 18:16:02 CEST
Such problem usually happens if some wrong manipulations to the geometry is done (wrong deletion order of elements of the geometry or in wrong application state). It does not depend on the singletons. Are you overloading the default behaviour of Geant4 and its run-manager? Proper destruction of objects should be assured if you explicitly delete the run-manager at the end of your main(). Are you doing so? The G4RunManager is held by a unique_ptr in a module which is deleted by the processing framework before the framework exits. Once the framework completes its execution, after printing its final message, the warning messages are printed at the very end of the lifetime of the entire executable. That explains the problem. Thanks for investigating. Based on the current design in Geant4, derivates from G4RunManager (or pointers to G4RunManager itself) should not be defined as a smart pointer. It is instead expected the pointer to the run-manager is explicitly deleted at the end of the user application (or framework). You may try to mimic the sequence of destruction made in G4RunManagerKernel, by explicitly opening the geometry somewhere in the framework code at job closure, and that may clear those warnings, but cannot guarantee that other problems in different areas may occur due to wrong deletion order of static instances. It turned out to be a problem with the event processing framework used, where during a TBB migration a class was missed while converting from using bare pointers to smart pointers. Now fixed. Sorry for the false alarm. |