GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Reading parameter file, ROOT::delete_TFile(void*) ()
Reading parameter file, ROOT::delete_TFile(void*) () [message #17544] Wed, 19 November 2014 16:36 Go to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Dear all,
I have noticed that when running my ideal deco macro
it gets to segmentation fault caused by a problem with
ROOT::delete_TFile(void*) ()
or by PndHyp::Streamer get the following error message


here is the output,
[lorente@himster Alicia]$ root -l hit_hypmvd.C
root [0]
Processing hit_hypmvd.C...
FairRootManager::OpenOutFile("/data/work/kpha4/lorente/sim_panda/hypIdealreco.root ")
[INFO ] The input consists out of the following trees and files:
[INFO ] - cbmsim
[INFO ] - /data/work/kpha4/lorente/sim_panda/Sim_hypFSG41TXm_GB.root
[INFO ] Parameter and input file are available, Assure that basic info is there for the run!
[INFO ] The number of entries in chain is 2000
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] No event Header was found!!!
[INFO ] Branch: EventHeader. not found in Tree
[INFO ] Branch: EventHeader. not found in Tree

*************************************************************
initialisation for run id 1416404318
*************************************************************
-I- FairRunTimeDB::InitContainer() FairGeoParSet
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is cave. Master volume is cave
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoManager::CountLevels>: max level = 4, max placements = 24
Info in <TGeoManager::CloseGeometry>: 101 nodes/ 58 volume UID's in FAIR geometry
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
Container FairGeoParSet initialized from ROOT file.
-I- FairRunTimeDB::InitContainer() FairBaseParSet

*** Break *** segmentation violation

[3]+ Stopped root -l hit_hypmvd.C
[lorente@himster Alicia]$ ===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x0000003511eabf9e in waitpid () from /lib64/libc.so.6
#1 0x0000003511e3e899 in do_system () from /lib64/libc.so.6
#2 0x00002b8e59f9ebc8 in TUnixSystem::StackTrace() ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libCore.so.5.34
#3 0x00002b8e59f9e053 in TUnixSystem::DispatchSignals(ESignals) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libCore.so.5.34
#4 <signal handler called>
#5 0x00002b8e5e7d1cd0 in ROOT::delete_TFile(void*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#6 0x00002b8e59f6e4d8 in TClass::Destructor(void*, bool) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libCore.so.5.34
#7 0x00002b8e5e6f0f66 in TBufferFile::ReadFastArray(void**, TClass const*, int, bool, TMemberStreamer*, TClass const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#8 0x00002b8e5e7b0a17 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#9 0x00002b8e5e72e71e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#10 0x00002b8e5e6eb3e5 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#11 0x00002b8e5e6eb89b in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#12 0x00002b8e624d4ca3 in PndHyp::Streamer (this=0x2558260
===========================================================


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 0x00002b8e5e7d1cd0 in ROOT::delete_TFile(void*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#6 0x00002b8e59f6e4d8 in TClass::Destructor(void*, bool) () from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libCore.so.5.34
#7 0x00002b8e5e6f0f66 in TBufferFile::ReadFastArray(void**, TClass const*, int, bool, TMemberStreamer*, TClass const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#8 0x00002b8e5e7b0a17 in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#9 0x00002b8e5e72e71e in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#10 0x00002b8e5e6eb3e5 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#11 0x00002b8e5e6eb89b in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) ()
from /cluster/gsi/fairsoft/gcc/fairsoft_apr13/lib/root/libRIO.so.5.34
#12 0x00002b8e624d4ca3 in PndHyp::Streamer (this=0x2558260
===========================================================





Does someone has an idea?
What is the meaning of the Streamer.
I know it is related with the version of the dictionary created for root.
Is there a maximum number for that?

do we still need the PndXXGeo PndXXConFact?



please to reproduce the error go to macro/hyp/Alicia

there you can find a README.txt file where the information needed to run
the simulation is given.

thank you in advance

Alicia S.
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17545 is a reply to message #17544] Wed, 19 November 2014 16:42 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
In PndHyp destructor you should delete the objects you have created. In your case you are not deleting a TFile, a TTree and a TRandom. I suppose that is the reason.
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17546 is a reply to message #17545] Wed, 19 November 2014 17:57 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi ste,
unfortunately I'm getting the same problem.

what is the maximum number for the streaming of ClassDef?

9 ? 11?
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17547 is a reply to message #17546] Wed, 19 November 2014 18:01 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
There is no maximum number of ClassDef, if this is what you are asking.
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17548 is a reply to message #17545] Wed, 19 November 2014 20:06 Go to previous messageGo to next message
Klaus Götzen is currently offline  Klaus Götzen
Messages: 293
Registered: June 2006
Location: GSI
first-grade participant
From: *adsl.alicedsl.de
Hi Alicia,


a streamer is the method of the dictonary of a ROOT class which takes care about persiting an object to file (as far as I understand). When writing the class interface you can actually mark member variables which shall not be written (e.g. temporary objects created when the class is created) with a comment like

int member; //! 


I noticed that the member variable fFile (see https://subversion.gsi.de/trac/fairroot/browser/pandaroot/trunk/hyp/PndH yp.h#L226) and perhaps others might be automatically streamed since they are not marked to be ignored by the streamer.

In summary, you could try to put a "//!" like

226	  TFile *fFile; //!
227	  TTree *ft; //!
228	  TClonesArray *fEvt; //!

and try whether this helps (just an idea, I'm not at all sure Wink).


Best,
Klaus

PS: Here is some docu about streamers: http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch11s03.html
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17549 is a reply to message #17547] Wed, 19 November 2014 20:56 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi again,
ok I think I have found a way by initialising
the pointers to the TObjects within the class constructors, and
calling the corresponding delete functions within the destructors. Embarassed
Hopefully, I can come back to my previous happy life again
more wiser and with additional white hairs.

regards

Alicia.
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17550 is a reply to message #17548] Wed, 19 November 2014 20:58 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Klaus
thank you very much
for the info !!!
that is great !

kind regards
alicia.
Re: Reading parameter file, ROOT::delete_TFile(void*) () [message #17551 is a reply to message #17549] Wed, 19 November 2014 21:00 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *ip71.fastwebnet.it
Well,

Quote:
initialising the pointers to the TObjects within the class constructors, and calling the corresponding delete functions within the destructors.


this is how C++ works... If you don't do it you produce memory problems Smile
Previous Topic: [FIXED] FairEvtFilter problem with c++11
Next Topic: tracks belonging to the same MC truth track
Goto Forum:
  


Current Time: Thu Apr 25 01:37:46 CEST 2024

Total time taken to generate the page: 0.00799 seconds