Message: KeepTheCurrentEvent() causes Seg Fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question KeepTheCurrentEvent() causes Seg Fault 

Forum: Event and Track Management
Date: 28 Sep, 2011
From: <HadronTherapy_Aachen>

Hey everbody,

since I want to review interesting events after a huge run, I tried the method KeepTheCurrentEvent() from G4EventManager as it was illustrated in chapter 6.2 from the application developers guide:

Added G4EventManager as protected member and in the EndofEventAction() I did

if (aSteppingAction->GetGoodEvent() == true)
    EventManager->KeepTheCurrentEvent();

I also added the necessary lines to my run macro:

/run/initialize
/vis/scene/create
/vis/open HepRepFile
/vis/drawVolume
/tracking/storeTrajectory
/vis/scene/add/trajectories smooth
...
/vis/disable
/gun/particle ion
/gun/ion 6 12 +6
/run/beamOn 50
/vis/enable
/vis/reviewKeptEvents

But when I compile and run my program I get an segmentation fault after invoking the EventManager->KeepTheCurrentEvent() method:

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00002ad614524c18 in G4EventManager::KeepTheCurrentEvent() ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4event.so
#6  0x00002ad612141b67 in G4RTDEventAction::EndOfEventAction (this=0x15a6580, evt=0x2fbac20) at src/G4RTDEventAction.cc:64
#7  0x00002ad614525d16 in G4EventManager::DoProcessing(G4Event*) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4event.so
#8  0x00002ad6142ef3ed in G4RunManager::DoEventLoop(int, char const*, int) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4run.so
#9  0x00002ad6142eec22 in G4RunManager::BeamOn(int, char const*, int) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4run.so
#10 0x00002ad6142f3640 in G4RunMessenger::SetNewValue(G4UIcommand*, G4String) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4run.so
#11 0x00002ad61753de0b in G4UIcommand::DoIt(G4String) () from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#12 0x00002ad61754de09 in G4UImanager::ApplyCommand(char const*) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#13 0x00002ad61752c434 in G4UIbatch::ExecCommand(G4String const&) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#14 0x00002ad61752db1e in G4UIbatch::SessionStart() () from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#15 0x00002ad617549e95 in G4UImanager::ExecuteMacroFile(char const*) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#16 0x00002ad617544b14 in G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#17 0x00002ad61753de0b in G4UIcommand::DoIt(G4String) () from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#18 0x00002ad61754de09 in G4UImanager::ApplyCommand(char const*) ()
   from /home/home2/institut_3b/geant4rt/geant4.9.4/lib/Linux-g++/libG4intercoms.so
#19 0x0000000000405784 in main (argc=<value optimized out>, argv=0x7fff68a43ec8) at G4RTD.cc:178
===========================================================

Do you have any idea why? I use the Geant4 version 9.4.

Thanks in advance,
Jan

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

1 Idea: Re: KeepTheCurrentEvent() causes Seg Fault   (L.G. Sarmiento - 29 Nov, 2011)
 Add Message Add Message
to: "KeepTheCurrentEvent() causes Seg 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 ]