Problem 1262

Summary: Infinite Loop condition in Subtraction Solid
Product: Geant4 Reporter: John Apostolakis <John.Apostolakis>
Component: geometry/solidsAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: 9.4   
Hardware: PC   
OS: Linux   

Description John Apostolakis 2011-11-09 09:55:00 CET
In a simulation of an ATLAS setup, Paul Miyagawa got the following message a large number of time (at least until quota exceeded):

*** G4Exception : InfiniteLoop
      issued by : G4SubtractionSolid::DistanceToIn(p,v)
Illegal condition caused by solids: G4Tubs and DisplacedSolid
*** Event Must Be Aborted

From a code inspection it is clear that this problem must be cause by roundoff error or a similar problem. A scenarios where this is due to a bad definition of a Subtraction Solid is hard to imagine.

As this is a fatal error (event abort) the code must be improved to report information on the relevant solids and the arguments of the method, in order to provide the information with which to debug it.
Comment 1 Gabriele Cosmo 2011-11-09 18:29:26 CET
The error condition has been already revised in the development version, where now the event is no longer aborted.
Such condition typically happens when constituents of the Boolean operation are subtracted and have shared surfaces (all or in part). This is a known 'feature' of Boolean subtraction which is also documented in the User's Guide, and is also one of the cases causing visualization to fail.
See also problem report #1229, where the same issue was reported and the problem turned out to be exactly this in the user's geometry.