Message: About TestEm7 Segmentation fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None About TestEm7 Segmentation fault 

Forum: Analysis
Date: 29 Dec, 2004
From: <tchen@126.com>

I use OpenScientists to do the anaysis.

***************************************** For TestEm7 case, the rusult is as below:

..... ----> Histogram Tree saved

--------- Ranecu engine status ---------
 Initial seed (index) = 0
 Current couple of seeds = 1514134595, 998964003
----------------------------------------
#
Graphics systems deleted.
Visualization Manager deleting...
UserDetectorConstruction deleted.
UserPhysicsList deleted.
Segmentation fault
*****************************************
The I changed the code RunAction.cc like this:

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void RunAction::cleanHisto()
{
#ifdef G4ANALYSIS_USE
  tree->commit();       // Writing the histograms to the file
  tree->close();        // and closing the tree (and the file)
//  delete tree;        //<--------change here 

G4cout << "\n----> Histogram Tree saved" << G4endl; #endif }

Then recompile and run, the rusults is : ****************************************

............ ............

----> Histogram Tree saved

--------- Ranecu engine status ---------
 Initial seed (index) = 0
 Current couple of seeds = 1514134595, 998964003
----------------------------------------
#
Graphics systems deleted.
Visualization Manager deleting...
UserDetectorConstruction deleted.
UserPhysicsList deleted.
UserRunAction deleted.
UserPrimaryGenerator deleted.
G4 kernel has come to Quit state.
EventManager deleted.
UImanager deleted.
StateManager deleted.
RunManagerKernel is deleted.
RunManager is deleting.
****************************************
Now it works. 

The code in TestEm7.cc 
  delete runManager;
don't work because af is not deleted.

af is in the code of RunAction.cc
RunAction::~RunAction()
{
  delete tallyEdep;

#ifdef G4ANALYSIS_USE
  delete af;  //<---here confict with "delecte tree"
#endif
}

When delete tree, the af is not deleted. If not delete tree, af can be delelted. Maybe the reason is tree is included in af.

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

1 None: Re: About TestEm7 Segmentation fault   (Guy Barrand - 06 Jan, 2005)
(_ None: Re: About TestEm7 Segmentation fault   (Guy Barrand - 18 Jan, 2005)
 Add Message Add Message
to: "About TestEm7 Segmentation fault"

 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 ]