Photon gets stuck at boundary

I am having a problem with photons interacting with a piece of my geometry. I have double and tippled checked overlaps and have found none. I am confident that this is not the source of the error because it occurs at the boundary between the world volume and my copper pieces (unless I am reading the traceback incorrectly). The volume in question is a rough PCB built out of several copper pieces (each a little over 1mm thick). When investigating this problem previously I have found mention of a potential “bug” in the implication of the solid or navigator but am unsure of what steps to take to fix this problem.

Here is reference to a topic with a similar problem however his was an overlap error.

### pop requested out of 0 stacked tracks.
### 0 waiting tracks are re-classified to
     0 urgent tracks and 0 waiting tracks.
NULL returned from G4StackManager.
Terminate current event processing.
=====================================
  G4EventManager::ProcessOneEvent()  
=====================================
1 vertices passed from G4Event.
Primary particle (gamma) --- Transfered with momentum (-0.0241176047083722,0.01157040153975263,-0.05314806629915705)
A new track 0x7f9f245bffe0 (trackID 1, parentID 0) is passed to G4StackManager.
1 primaries are passed from G4EventTransformer.
!!!!!!! Now start processing an event !!!!!!!
### pop requested out of 1 stacked tracks.
Track 0x7f9f245bffe0 (trackID 1, parentID 0) is passed to G4TrackingManager.

*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   0.0411 -0.00455     37.5    0.0595        0        0         0       World initStep
    1    -12.6     6.05      9.7    0.0595        0     31.1      31.1  CopperPhys Transportation
    2    -12.6     6.05      9.7    0.0595        0        0      31.1       World Transportation
    3    -12.6     6.05      9.7    0.0595        0        0      31.1  CopperPhys Transportation
    4    -12.6     6.05      9.7    0.0595        0        0      31.1       World Transportation
    5    -12.6     6.05      9.7    0.0595        0        0      31.1  CopperPhys Transportation
    6    -12.6     6.05      9.7    0.0595        0        0      31.1       World Transportation
    7    -12.6     6.05      9.7    0.0595        0        0      31.1  CopperPhys Transportation
    8    -12.6     6.05      9.7    0.0595        0        0      31.1       World Transportation
    9    -12.6     6.05      9.7    0.0595        0        0      31.1  CopperPhys Transportation
   10    -12.6     6.05      9.7    0.0595        0        0      31.1       World Transportation

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav1002
      issued by : G4Navigator::ComputeStep()
Track stuck or not moving.
          Track stuck, not moving for 10 steps
          in volume -World- at point (-12.57056305372941,6.04587764860676,9.704870321532848) (local point (-12.57056305372941,6.04587764860676,9.704870321532848))
          direction: (-0.4053378942583562,0.1944605300798762,-0.8932448117505387) (local direction: (-0.4053378942583562,0.1944605300798762,-0.8932448117505387)).
          Potential geometry or navigation problem !
          Trying pushing it of 1e-07 mm ...Potential overlap in geometry!

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

   11    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   12    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   13    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   14    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   15    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   16    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   17    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   18    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   19    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   20    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   21    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   22    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   23    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
   24    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
   25    -12.6     6.05      9.7    0.0595        0    1e-07      31.1  CopperPhys Transportation
Checking overlaps for volume CopperPhys ... OK! 

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomNav0003
      issued by : G4Navigator::ComputeStep()
Stuck Track: potential geometry or navigation problem.
        Track stuck, not moving for 25 steps
        in volume -CopperPhys- at point (-12.5706,6.04588,9.70487)
        direction: (-0.405338,0.194461,-0.893245).
*** Event Must Be Aborted ***
G4Track (0x7f9f245bffe0) - track ID = 1, parent ID = 0
 Particle type : gamma - creator process : not available
 Kinetic energy : 59.5 keV - Momentum direction : (-0.405338,0.194461,-0.893245)
 Step length : 1 Ang - total energy deposit : 0 eV 
 Pre-step point : (-12.5706,6.04588,9.70487) - Physical volume : CopperPhys (G4_Cu)
 - defined by : Transportation - step status : 1
 Post-step point : (-12.5706,6.04588,9.70487) - Physical volume : CopperPhys (G4_Cu)
 - defined by : phot - step status : 7
 *** Note: Step information might not be properly updated.

-------- EEEE -------- G4Exception-END --------- EEEE -------

   26    -12.6     6.05      9.7    0.0595        0    1e-07      31.1       World Transportation
Track (trackID 1, parentID 0) is processed with stopping code 3

After several days of investigation I have an update regarding this problem. While I have found no clear solution as of yet I am fairly confident that the problem lies in my use of MultiUnion’s. The piece in questions, which appears to be the source of the error, is formed from a MultiUnion of MultiUnion’s

linkArc = new G4Torus("linkArc", 0, linkThick, linkRadius, 0, 90*deg);
linkCon = new G4Tubs("linkConnect", 0, linkThick, (vertThick + 1*mm)*0.5, 0, 360*deg);
linkPin = new G4Tubs("linkPin", 0, linkThick, 2.5*mm, 0, 360*deg); 


link = new G4MultiUnion("link");

rotate = new G4RotationMatrix();

G4Transform3D transform3(*rotate, G4ThreeVector(0, 0, 0));
link -> AddNode(*linkArc, transform3);

rotate -> rotateX(90*deg);
G4Transform3D transform4(*rotate, G4ThreeVector(2.28*mm, (vertThick + 1*mm)*(-0.5), 0));
link -> AddNode(*linkCon, transform4);
rotate -> rotateX(-90*deg);

rotate -> rotateY(90*deg);
G4Transform3D transform5(*rotate, G4ThreeVector(-2.5*mm, 2.28*mm, 0));
link -> AddNode(*linkPin, transform5);
rotate -> rotateY(-90*deg);

link -> Voxelize();

Links = new G4MultiUnion("Links");

for (int i = 0; i < 8; i++){
	for (int j = 0; j < 7; j++){
		rtate->rotateY(-90*deg);
		rtate->rotateZ(180*deg);
		G4Transform3D transform(*rtate, G4ThreeVector(jointLocations[j], vertLocations[i] - 0.4*mm, 3.175*mm));
		Links -> AddNode(*link, transform);
		rtate->rotateZ(-180*deg);
		rtate->rotateY(90*deg);
	}
}

G4Transform3D transform6(*rotate, G4ThreeVector(0, 0, 0));
Links -> AddNode(*Pins, transform6); 

Links -> Voxelize();

Here is the snippet of relevant code. I need to Voxelize both multiunions or I am faced with a seg fault and am unsure as to how I should best build this geometry without the the double MultiUnion. This is the definitely the source of the error because when I simply insert the relevant component (linkPin) from its original construct there is no tracking error.

The problem has been resolved, while less elegant I know simply form all of the shapes in one MultiUnion, it took quite a few more transformations but I no longer have the tracking error from before and my geometry appears to be functional. For anyone stuck with a similar problem, I hope this thread is useful.