Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
nptool nptool
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • np
  • nptoolnptool
  • Issues
  • #6

Closed
Open
Created Oct 10, 2016 by Adrien Matta@matta☠Owner

W1 Simulation Crash

Created by: padsley

I'm adding this mainly so that I have a reference for myself. Sorry for clogging up your inboxes.

I'm trying to use the W1s using npsimulation, mainly to check to see whether my calculated W1 positions for n-si-90 are correct.

Running the command:

npsimulation -D W1nsi90.detector -E alpha.source -O SPcoincW1_19F_test

where W1nsi90.detector is my modified input file (as I hate to break the original one), then I get this output:

/////////////////////////////////////////
//// Adding Detector W1
///
W1 element found: 
Theta:  113
Phi:  0
R:  110
Beta:  0 0 0
///
W1 element found: 
Theta:  113
Phi:  0
R:  150
Beta:  0 0 0
///
W1 element found: 
Theta:  156
Phi:  0
R:  150
Beta:  0 0 0
///
W1 element found: 
Theta:  156
Phi:  0
R:  150
Beta:  0 0 0
///
W1 element found: 
Theta:  -135
Phi:  0
R:  150
Beta:  0 0 0
///
W1 element found: 
Theta:  -135
Phi:  0
R:  150
Beta:  0 0 0
/////////////////////////////////////////
L226test
L231test
L233test
L231test

 *** Break *** segmentation violation

where the cout statements are shown below...

    else{
      std::stringstream oss(LineBuffer);
      std::string token;
      oss >> token ;
      NPS::VDetector* detector = theFactory->Construct(token);
      if(detector!=NULL && check.find(token)==check.end()){
        cout << "/////////////////////////////////////////" << endl;
        cout << "//// Adding Detector " << token << endl; 
        detector->ReadConfiguration(Path);
        cout << "/////////////////////////////////////////" << endl;
        // Add array to the VDetector Vector
        AddDetector(detector);
        check.insert(token);cout << "L226test" << endl;
      }
      else{
        if(detector!=NULL)
        {
            cout << "L231test" << endl;
          delete detector;
          cout << "L233test" << endl;
        }
      }
    }
  }
cout << "L234test" << endl;
  ConfigFile.close();
  cout << "\033[0m" ;

Stack trace is:

===========================================================
#5  0x00007f4f0753ec78 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x00007f4ef822cbe0 in W1::~W1() () from /home/padsley/codes/nptool/NPSimulation/lib/libNPSW1.so
#7  0x00007f4ef822ccd9 in W1::~W1() () from /home/padsley/codes/nptool/NPSimulation/lib/libNPSW1.so
#8  0x00007f4f0a1a8809 in DetectorConstruction::ReadConfigurationFile() () from /home/padsley/codes/nptool/NPSimulation/lib/libNPSCore.so
#9  0x00007f4f0875da2c in G4RunManager::InitializeGeometry (this=0x25e5320) at /home/padsley/codes/geant4/geant4.10.02.p02/source/run/src/G4RunManager.cc:581
#10 0x00007f4f0875db21 in G4RunManager::Initialize (this=0x25e5320) at /home/padsley/codes/geant4/geant4.10.02.p02/source/run/src/G4RunManager.cc:565
#11 0x0000000000404628 in main ()
===========================================================

I think that this suggests that the code is trying to delete something that it can't at delete detector;.

Not sure what that is at the moment, though.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking