geant4-10-07-ref-00 on CentOS7.
I am trying to use G4MultiUnion
to add a base to a cylinder, to start with, in order to avoid G4UnionSolid
aiming to assemble more complex structures.
G4VSolid* solidDewarSide = new G4Tubs("solidDewarSide", 301.63*mm, 307.98*mm, 1054.10*mm, 0.0*deg, 360.0*deg);
G4VSolid* solidDewarBottom = new G4Tubs("solidDewarBottom", 0, 307.98*mm, 6.35*mm, 0.0*deg, 360.0*deg);
G4MultiUnion* solidDewar = new G4MultiUnion("solidDewar");
G4Transform3D transformZ0 = G4TranslateZ3D(0);
G4Transform3D transformZ = G4TranslateZ3D(-1054.10*mm-6.35*mm);
solidDewar->AddNode(*solidDewarSide, transformZ0);
solidDewar->AddNode(*solidDewarBottom, transformZ);
G4LogicalVolume *logicDewar = new G4LogicalVolume(solidDewar, Al6061, "logicDewarSide");
G4VPhysicalVolume *physDewar = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), logicDewar, "physDewar", logicWorld, false, 0, true);
At the runtime I get a Segmentation fault in this point
==2002243== Invalid read of size 8
==2002243== at 0xF88BD8A: G4Voxelizer::GetCandidatesVoxelArray(CLHEP::Hep3Vector const&, std::vector<int, std::allocator<int> >&, G4SurfBits*) const (G4Voxelizer.cc:987)
==2002243== by 0xF7BA6E4: G4MultiUnion::InsideWithExclusion(CLHEP::Hep3Vector const&, G4SurfBits*) const (G4MultiUnion.cc:449)
==2002243== by 0xF7B6CEE: G4MultiUnion::GetPointOnSurface() const (G4MultiUnion.cc:948)
==2002243== by 0xF8A3BC5: G4PVPlacement::CheckOverlaps(int, double, bool, int) (G4PVPlacement.cc:263)
==2002243== by 0xF8A6D6E: G4PVPlacement::G4PVPlacement(CLHEP::HepRotation*, CLHEP::Hep3Vector const&, G4LogicalVolume*, G4String const&, G4LogicalVolume*, bool, int, bool) (G4PVPlacement.cc:114)
==2002243== by 0x414575: MyDetectorConstruction_fridge5::Construct() (construction_fridge5.cc:115)
I checked that the problem is not due to volumes overlapping (btw, could they overlap in principle to be merged?).
I have also tried adding a single volume, or even no volumes at all.
Thanks for your help!