| Summary: | Segmentation Fault when using LocateGlobalPointAndSetup(myPoint) if point is inside a volume that contains a parameterized volume | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Ioannis Sechopoulos <isechop> |
| Component: | geometry/navigation | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | P5 | ||
| Version: | 9.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Ioannis Sechopoulos
2007-09-24 17:21:57 CEST
Can you please specify in which conditions you're trying to locate the point ? Are you doing this during tracking time (i.e. while your simulation is going on) ? I am attempting to do this while the simulation is idle. Before running /run/beamOn, I created a class that is run using a UI command. It scans the geometry at different points to get some information I need, if one of these points falls inside a volume with a parameterized volume it crashes, if not, everything works fine, and the program returns to idle. Thanks. The problem is under investigation. In order to have the navigator determine the proper instance of the parameterised volume to locate, it is necessary that the geometry is 'closed' before issueing the actual locate, i.e., the geometry optimisation must be loaded in memory. In your case, you are attemping to locate -before- issueing beamOn, which means that the geometry is still in 'open' state. Try to do either the following: - call "/run/initialize" before issueing the locate or: - add the following line in your code before the locate: G4GeometryManager::GetInstance()->CloseGeometry(); Be aware that, as expressed in the FAQ, it is advisable to adopt an alternative instance of the navigator for operations other than tracking; using the navigator for the tracking for performing explicit locations while tracking will cause the navigator to change its state and therefore invalidate the simulation and/or be exposed to unstable behavior and crashes. |