Hi Phil, Somehow it looks like the MakeClass generated is wrong and leads to memory corruption (maybe taking a look at the result of tree->Print() and the content of the result of MakeClass would help). > Can anyone give any help without having to see the whole file (which is about > 2GB)? Not really ... but ... It might be simple enough to create a subset of your file: open the file orig = (TTree*)_file0->Get("NtpSR"); newfile = new TFile("short.root"); orig->CloneTree(30); newfile->Write(); Also check that the new shorter file also present the problem. Alternatively maybe we have access to a common machine (somewhere @ fermi) where I could read the file. Cheers, Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Philip Symes Sent: Tuesday, April 06, 2004 5:46 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Seg fault from files accessed using MakeClass but not from console Hi ROOTers, I have a problem which I have seen on ROOT versions 3.10, 4.00/2 and 4.00/3. I tried this on Intel P4 machines running RedHat 9 and FermiLinux LTS 3.0.1 (a RedHat clone). I run MakeClass on a file, and then try to open that file and use the skeleton Loop() function (or any GetEntry() function). ROOT immediately complains of a SegV) - see below. Otherwise, the file is fine, and I can look at data, histograms, etc. [symes@minos09 fardet]$ root oneMonthsFDEvents.root ******************************************* * * * W E L C O M E to R O O T * * * * Version 4.00/03 22 March 2004 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for linux with thread support. CINT/ROOT C/C++ Interpreter version 5.15.128, Mar 16 2004 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] Attaching file oneMonthsFDEvents.root as _file0... Warning in <TClass::TClass>: no dictionary for class VldContext is available Warning in <TClass::TClass>: no dictionary for class VldTimeStamp is available Warning in <TClass::TClass>: no dictionary for class RecRecord is available Warning in <TClass::TClass>: no dictionary for class RecHeader is available Warning in <TClass::TClass>: no dictionary for class NtpSRRecord is available Warning in <TClass::TClass>: no dictionary for class RecRecordImp<RecCandHeader> is available Warning in <TClass::TClass>: no dictionary for class RecCandHeader is available Warning in <TClass::TClass>: no dictionary for class RecPhysicsHeader is available Warning in <TClass::TClass>: no dictionary for class RecDataHeader is available Warning in <TClass::TClass>: no dictionary for class NtpSREventSummary is available Warning in <TClass::TClass>: no dictionary for class NtpSRPulseHeight is available Warning in <TClass::TClass>: no dictionary for class NtpSRPlane is available Warning in <TClass::TClass>: no dictionary for class NtpSRDate is available Warning in <TClass::TClass>: no dictionary for class NtpSRShieldSummary is available Warning in <TClass::TClass>: no dictionary for class NtpSRCosmicRay is available Warning in <TClass::TClass>: no dictionary for class NtpSRDmxStatus is available Warning in <TClass::TClass>: no dictionary for class NtpSRShieldStrip is available Warning in <TClass::TClass>: no dictionary for class NtpSRStrip is available Warning in <TClass::TClass>: no dictionary for class NtpSRSlice is available Warning in <TClass::TClass>: no dictionary for class NtpSRShower is available Warning in <TClass::TClass>: no dictionary for class NtpSRStripPulseHeight is available Warning in <TClass::TClass>: no dictionary for class NtpSRVertex is available Warning in <TClass::TClass>: no dictionary for class NtpSRTrack is available Warning in <TClass::TClass>: no dictionary for class NtpSRTrackPlane is available Warning in <TClass::TClass>: no dictionary for class NtpSRFiducial is available Warning in <TClass::TClass>: no dictionary for class NtpSRTrackTime is available Warning in <TClass::TClass>: no dictionary for class NtpSRMomentum is available Warning in <TClass::TClass>: no dictionary for class NtpSRFitTrack is available Warning in <TClass::TClass>: no dictionary for class NtpSREvent is available root [1] .ls TFile** oneMonthsFDEvents.root Persistency file TFile* oneMonthsFDEvents.root Persistency file KEY: TTree NtpSR;400 Persistency stream tree KEY: TTree NtpSR;399 Persistency stream tree KEY: TProcessID ProcessID0;1 0084dd20-544e-1f84-931a-df80b88bbeef root [2] NtpSR->MakeC MakeClass MakeCode root [2] NtpSR->MakeClass("test") Info in <TTreePlayer::MakeClass>: Files: test.h and test.C generated from TTree: NtpSR (Int_t)0 root [3] .L test.C root [4] test s root [5] s.Loop() *** Break *** segmentation violation Generating stack trace... 0xb693f8af in TBranchElement::ReadLeaves(TBuffer&) + 0x603 from /opt/root/lib/libTree.so 0xb6936ce6 in TBranch::GetEntry(int, int) + 0x1ae from /opt/root/lib/libTree.so 0xb693e878 in TBranchElement::GetEntry(int, int) + 0x1be from /opt/root/lib/libTree.so 0xb693e829 in TBranchElement::GetEntry(int, int) + 0x16f from /opt/root/lib/libTree.so 0xb693e829 in TBranchElement::GetEntry(int, int) + 0x16f from /opt/root/lib/libTree.so 0xb695caa0 in TTree::GetEntry(int, int) + 0x94 from /opt/root/lib/libTree.so 0xb6974897 in <unknown> from /opt/root/lib/libTree.so 0xb6ed31a2 in G__call_cppfunc + 0x263 from /opt/root/lib/libCint.so 0xb6ec2cda in G__interpret_func + 0x6e0 from /opt/root/lib/libCint.so 0xb6eaab73 in G__getfunction + 0x12a2 from /opt/root/lib/libCint.so 0xb6f2d6d7 in G__getstructmem + 0x82a from /opt/root/lib/libCint.so 0xb6f277f0 in G__getvariable + 0x4bc from /opt/root/lib/libCint.so 0xb6ea2256 in G__getitem + 0x5c1 from /opt/root/lib/libCint.so 0xb6ea0e9e in G__getexpr + 0x75ce from /opt/root/lib/libCint.so 0xb6ea08af in G__getexpr + 0x6fdf from /opt/root/lib/libCint.so 0xb6eee40f in G__exec_statement + 0x2629 from /opt/root/lib/libCint.so 0xb6eeb473 in G__exec_loop + 0x23e from /opt/root/lib/libCint.so 0xb6eebb2c in G__exec_for + 0x18e from /opt/root/lib/libCint.so 0xb6eedef2 in G__exec_statement + 0x210c from /opt/root/lib/libCint.so 0xb6ec4419 in G__interpret_func + 0x1e1f from /opt/root/lib/libCint.so 0xb6eaab73 in G__getfunction + 0x12a2 from /opt/root/lib/libCint.so 0xb6f2d6d7 in G__getstructmem + 0x82a from /opt/root/lib/libCint.so 0xb6f277f0 in G__getvariable + 0x4bc from /opt/root/lib/libCint.so 0xb6ea2256 in G__getitem + 0x5c1 from /opt/root/lib/libCint.so 0xb6ea0e9e in G__getexpr + 0x75ce from /opt/root/lib/libCint.so 0xb6ee76b0 in G__exec_function + 0x1d5 from /opt/root/lib/libCint.so 0xb6eee194 in G__exec_statement + 0x23ae from /opt/root/lib/libCint.so 0xb6e8a6c7 in G__exec_tempfile_core + 0x2ce from /opt/root/lib/libCint.so 0xb6e8a8a4 in G__exec_tempfile_fp + 0x22 from /opt/root/lib/libCint.so 0xb6ef6062 in G__process_cmd + 0x43fa from /opt/root/lib/libCint.so 0xb719ba01 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0xa9 from /opt/root/lib/libCore.so 0xb711bf82 in TApplication::ProcessLine(char const*, bool, int*) + 0x596 from /opt/root/lib/libCore.so 0xb67cfb21 in TRint::HandleTermInput() + 0x1e1 from /opt/root/lib/libRint.so 0xb67ce95e in TTermInputHandler::Notify() + 0x24 from /opt/root/lib/libRint.so 0xb67d03ca in TTermInputHandler::ReadNotify() + 0x12 from /opt/root/lib/libRint.so 0xb71fe0a0 in TUnixSystem::CheckDescriptors() + 0xe4 from /opt/root/lib/libCore.so 0xb71fd888 in TUnixSystem::DispatchOneEvent(bool) + 0xfe from /opt/root/lib/libCore.so 0xb716bd84 in TSystem::InnerLoop() + 0x18 from /opt/root/lib/libCore.so 0xb716bd29 in TSystem::Run() + 0x6f from /opt/root/lib/libCore.so 0xb711c9f1 in TApplication::Run(bool) + 0x2d from /opt/root/lib/libCore.so 0xb67cf619 in TRint::Run(bool) + 0x30f from /opt/root/lib/libRint.so 0x08048861 in main + 0x71 from /opt/root/bin/root.exe 0xb659d748 in __libc_start_main + 0xf8 from /lib/tls/libc.so.6 0x08048761 in _Unwind_Resume + 0x31 from /opt/root/bin/root.exe Root > Function Loop() busy flag cleared root [6] .q BUT Whben I open oneMonthsFDEvents.root in a ROOT session again, I get: root [1] NtpSR->GetEntry(33) (Int_t)14998 root [2] NtpSR->GetEntry(0) (Int_t)22614 root [3] .L test.C root [4] test f root [5] f.fChain->GetEnt variable "fChain" not defined. root [5] f.fChain->GetEntry(33) (Int_t)16126 root [6] f.fChain->GetEntry(0) *** Break *** segmentation violation Generating stack trace... 0xb693f8af in TBranchElement::ReadLeaves(TBuffer&) + 0x603 from /opt/root/lib/libTree.so etc. Can anyone give any help without having to see the whole file (which is about 2GB)? Cheers, Phil -- Philip Symes, MINOS Group, Fermilab. http://minoserv.maps.susx.ac.uk/~symes/ ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# #################################################################
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET