Problem 1972 - Fatal errors in twisted solids in MT mode with Ray Tracer with test202
Summary: Fatal errors in twisted solids in MT mode with Ray Tracer with test202
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 10.3
Hardware: Apple Mac OS X
: P4 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2017-05-07 10:55 CEST by John.Allison
Modified: 2017-05-11 10:26 CEST (History)
0 users

See Also:


Attachments
Macro file defining the view (1.40 KB, text/plain)
2017-05-07 10:55 CEST, John.Allison
Details

Note You need to log in before you can comment on or make changes to this problem.
Description John.Allison 2017-05-07 10:55:16 CEST
Created attachment 453 [details]
Macro file defining the view

I am wondering if twisted solids are not thread safe.  I’m getting this G4Exception with test202 with RayTracer, which uses multithreading.  With RayTracerX, which stays on the master thread, all is OK.

Try test202 in MT mode with
  /vis/open RayTracer
  /control/execute g4_01.g4view  # the attached macro
  /vis/viewer/flush.

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomSolids0003
      issued by : G4TwistTubsSide::DistanceToPlane()
Point p is behind the surfaces.
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------

If I remove the twisted tubs - Tst202DetectorConstruction.cc line 106 becomes
  volumeSelection["Twisted_Tubs"]                    = false;
I get this:

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomNav0003
      issued by : G4Navigator::GetLocalExitNormal()
 Parameters of solid: -----------------------------------------------------------
    *** Dump for solid - aTwistedBox ***
    ===================================================
 Solid type: G4TwistedBox
 Parameters: 
    pDx = 20 cm
    pDy = 30 cm
    pDz = 75 cm
    pPhiTwist = 50 deg
-----------------------------------------------------------
 Point for surface = (205.255,64.1194,-126.177)
Surface Normal returned by Solid is not a Unit Vector.

*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------
Comment 1 Gabriele Cosmo 2017-05-11 10:26:10 CEST
I've fixed a potential race condition in G4VTwistedSurface, in tag germ-specific-V10-03-05.