Problem 982

Summary: Unable to compile geometry with G4DEBUG_FIELD flag set in compiler.
Product: Geant4 Reporter: Mark Tobin <Mark.Tobin>
Component: geometry/magneticfieldAssignee: John Apostolakis <John.Apostolakis>
Status: RESOLVED FIXED    
Severity: trivial CC: Gabriele.Cosmo, Koichi.Murakami
Priority: P5    
Version: other   
Hardware: All   
OS: All   

Description Mark Tobin 2007-10-26 19:05:36 CEST
Hello,  I am trying to generate geant events in the lhcb framework and I get an exception in G4MagIntegratorDriver which I assume is due to some overlapping volumes (see error below).  
-------------------------------------------------------------------------------
exception
-------------------------------------------------------------------------------
 Hstep is 0

*** G4Exception : Requested Integration Step is zero or negative: it must be positive
      issued by : G4MagInt_Driver::AccurateAdvance()
Requested-Step-not-Positive.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***
-------------------------------------------------------------------------------

After much trial and error I decided to try to compile with the G4DEBUG_FIELD flag set so that I can try to see where in space the likely problem is.  Unfortunately this doesn't work.  The version of Geant used is 4.8.3 but I looked at the source code for 4.9.0.p01 and the same error is there.

I found the following compiler errors:

geometry/magneticfield/src/G4MagIntegratorDriver.cc
1 variable is not defined - xSubStart - and it wasn't obvious to me what the value should be.  For the time being I defined it as a G4double and gave it the value of x in my version but I don't know if that is right.
#ifdef  G4DEBUG_FIELD
  	  if(dbg>2) PrintStatus( ySubStepStart, xSubStart, y, x, h,  nstp); // Only
#endif

source/geometry/navigation/src/G4PropagatorInField.cc
there is a stray `` on line 538 of version 4.8.3 and line 545 of version 4.9.0
there is no ; on line 1240 of version 4.8.3 and line 1258 of version 4.9.0
Comment 1 Gabriele Cosmo 2007-11-16 09:13:37 CET
Compilation problem fixed in the internal tag "geomnav-V09-00-09".
Will be included in the next release or patch. Thanks.