Message: Segmentation error in a code based on N03 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Segmentation error in a code based on N03 

Keywords: Segmentation Error, Box
Forum: Geometry
Date: 07 Jul, 2005
From: Andres Russu <Andres.Russu@uv.es>

Dear Colleagues,

I am using ExN03 to devellop my own simulation. I am trying to simulate a graded shielding for a Electronic and Detector boxes. The code compile without any errors. But when I am trying to run the executable I am getting a Segmentation Error.

*************************************************************
 Geant4 version Name: geant4-07-01    (30-June-2005)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

You are using the simulation engine reuse library: PACK 2.4

You are using the simulation engine: LHEP_BIC 1.1

Thank you for using G4BinaryCascade. Thank you for using G4BinaryCascade. Visualization Manager instantiating... Visualization Manager initialising... Registering graphics systems...

You have successfully chosen to use the following graphics systems.
Current available graphics systems are:
  ASCIITree (ATree)
  DAWNFILE (DAWNFILE)
  GAGTree (GAGTree)
  G4HepRepFile (HepRepFile)
  G4HepRep (HepRepXML)
  RayTracer (RayTracer)
  VRML1FILE (VRML1FILE)
  VRML2FILE (VRML2FILE)
  OpenGLImmediateX (OGLIX)
  OpenGLStoredX (OGLSX)
/control/saveHistory
/run/verbose 2
#
# create empty scene
#
/vis/scene/create
#
# Create a scene handler for a specific graphics system
# (Edit the next line(s) to choose another graphic system)
#
# Use this open statement to get an .eps and .prim files
# suitable for viewing in DAWN.
/vis/open DAWNFILE
/vis/sceneHandler/create DAWNFILE
/vis/sceneHandler/attach
/vis/viewer/create ! ! 600
WARNING: objects with visibility flag set to "false" will not be drawn!
  "/vis/viewer/set/culling global false" to Draw such objects.
  Also see other "/vis/viewer/set" commands.
#
# Use this open statement instead for OpenGL in immediate mode.
/vis/open OGLIX
/vis/sceneHandler/create OGLIX
/vis/sceneHandler/attach
/vis/viewer/create ! ! 600
Got standard cmap
Window name: viewer-1 (OpenGLImmediateX)
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--11-80-100-100-m-60-iso8859-1
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--17-120-100-100-m-100-iso8859-1
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--20-140-100-100-m-110-iso8859-1
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso8859-1
G4OpenGLXViewer: XLoadQueryFont failed for font
  -adobe-courier-bold-r-normal--34-240-100-100-m-200-iso8859-1
WARNING: objects with visibility flag set to "false" will not be drawn!
  "/vis/viewer/set/culling global false" to Draw such objects.
  Also see other "/vis/viewer/set" commands.
/vis/viewer/refresh
Error de segmentación

*****************************************************************+++++

You can find here a part of the detector constructor:

G4VPhysicalVolume* ExN03DetectorConstruction::ConstructExN03() {

  // Clean old geometry, if any
  //

  G4GeometryManager::GetInstance()->OpenGeometry();
  G4PhysicalVolumeStore::GetInstance()->Clean();
  G4LogicalVolumeStore::GetInstance()->Clean();
  G4SolidStore::GetInstance()->Clean();

  // complete the Calor parameters definition
  //ComputeExN03Parameters();

  //     
  // World
  //

  solidWorld = new G4Box("World_box",				//its name
		   WorldSizeX/2,WorldSizeYZ/2,WorldSizeYZ/2);	//its size, half length

  logicWorld = new G4LogicalVolume(solidWorld,			//its solid
				   intergalactic,		//its material
				   "World_log");		//its name

  physiWorld = new G4PVPlacement(0,			//no rotation
				 G4ThreeVector(),	//at (X,Y,Z)
				 logicWorld,		//its logical volume				 
				 "World",		//its name
				 0,			//its mother  volume
				 false,			//no boolean operation
				 0);			//copy number

  // External Layer of Shielding

  solidExtLayer = new G4Box("extLayer_box",              
                          163.75*mm,71.875*mm,163.75*mm);

  logicExtLayer = new G4LogicalVolume(solidExtLayer,extLayer,"ExtLayer_log",0,0,0);

  physiExtLayer = new G4PVPlacement(0,                 		//no rotation
                                 G4ThreeVector(0,71.875*mm,0), 	//at (xPosition,0,0)
                                 logicExtLayer,        		//its logical volume
                                 "ExtLayer",	     		//its name
                                 logicWorld,    	      	//its mother  volume
                                 false,           	  	//no boolean operation
                                 0);                		//copy number

  // Medex Layer of Shielding

  solidMedexLayer = new G4Box("medexLayer_box",              
                          161.75*mm,70.875*mm,161.75*mm);

  logicMedexLayer = new G4LogicalVolume(solidMedexLayer,medexLayer,"medexLayer_log",0,0,0);

  physiMedexLayer = new G4PVPlacement(0,                 //no rotation
                                 G4ThreeVector(0,70.875*mm,0), 
                                 logicMedexLayer,        //its logical volume
                                 "medexLayer",     //its name
                                 logicExtLayer,        //its mother  volume
                                 false,             //no boolean operation
                                 0);                //copy number

  // Medin layer of shielding

  solidMedinLayer = new G4Box("edinLayer_box",              
                          161.50*mm,70.75*mm,161.50*mm);

  logicMedinLayer = new G4LogicalVolume(solidMedinLayer,medinLayer,"medinLayer_log",0,0,0);

  physiMedinLayer = new G4PVPlacement(0,                 //no rotation
                                 G4ThreeVector(0,70.75*mm,0), 
                                 logicMedinLayer,        //its logical volume
                                 "medinLayer",     //its name
                                 logicMedexLayer,        //its mother  volume
                                 false,             //no boolean operation
                                 0);                //copy number

  // Internal Layer of Shielding

  solidIntLayer = new G4Box("intLayer_box",              
                          161.*mm,70.5*mm,161.*mm);

  logicIntLayer = new G4LogicalVolume(solidIntLayer,intLayer,"intLayer_log",0,0,0);

  physiIntLayer = new G4PVPlacement(0,                 //no rotation
                                 G4ThreeVector(0,70.5*mm,0), 
                                 logicIntLayer,        //its logical volume
                                 "intLayer",         //its name
                                 logicMedinLayer,        //its mother  volume
                                 false,             //no boolean operation
                                 0);                //copy number

  // Electronic box 

  solidElecBox = new G4Box("ElecBox_box",              
                          160.*mm,70.*mm,160.*mm);

  logicElecBox = new G4LogicalVolume(solidElecBox,intergalactic,"ElecBox_log",0,0,0);

  physiElecBox = new G4PVPlacement(0,                 	//no rotation
                                 G4ThreeVector(0,70.*mm,0), 
                                 logicElecBox,        	//its logical volume
                                 "ElecBox",         	//its name
                                 logicIntLayer,        	//its mother  volume
                                 false,             	//no boolean operation
                                 0);                	//copy number

  // Detector Configuration

  solidDet = new G4Box("DetVolume_box",              
                          160.*mm,5.*mm,160.*mm);

  logicDet = new G4LogicalVolume(solidDet,detMaterial,"DetVolume_log",0,0,0);

  physiDet= new G4PVPlacement(0,                 		//no rotation
                                 G4ThreeVector(0,5.*mm,0), //
                                 logicDet,        	//its logical volume
                                 "DetVolume",     	//its name
                                 logicElecBox,        	//its mother  volume
                                 false,             	//no boolean operation
                                 0);                	//copy number

 // PrintExN03Parameters();     

  //                                        
  // Visualization attributes
  //

  logicElecBox->SetVisAttributes (G4VisAttributes::Invisible);

  G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
  simpleBoxVisAtt->SetVisibility(true);
  logicDet->SetVisAttributes(simpleBoxVisAtt);
  logicExtLayer->SetVisAttributes(simpleBoxVisAtt);
  logicMedexLayer->SetVisAttributes(simpleBoxVisAtt);
  logicMedinLayer->SetVisAttributes(simpleBoxVisAtt);
  logicIntLayer->SetVisAttributes(simpleBoxVisAtt);
  logicWorld->SetVisAttributes (G4VisAttributes::Invisible);

return physiWorld; }

Thank you in advance for helping me, Andres

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Segmentation error in a code based on N03   (John Allison - 07 Jul, 2005)
(_ None: Re: Segmentation error in a code based on N03   (Andres Russu - 08 Jul, 2005)
(_ None: Re: Segmentation error in a code based on N03   (John Allison - 08 Jul, 2005)
 Add Message Add Message
to: "Segmentation error in a code based on N03"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]