Project

General

Profile

Bug #1295

ROOT browser crashes while trying to read ROOT file made by MAUS (0.5.4)

Added by Pradhan, Neetish over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Data Structure
Target version:
Start date:
20 June 2013
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

OS: Scientific Linux 6.2 (64 bit)

I use the following commands to load the ROOT browser:
.L $MAUS_ROOT_DIR/build/libMausCpp.so
TBrowser B

Then, when I open a ROOT file and try to read the data in it (by opening a histogram of it in the browser), I get an error (which I have attached herewith). The version of ROOT that 0.5.4 uses is 5.34. I also tested the file with an older version of MAUS (0.2.4) which has a ROOT version of 5.30, and this is what I found:

- With 0.2.4, ROOT loads fine the files that were created with the same version of MAUS. However, it throws an error when I try to read a file created by the newer version of MAUS.
- With 0.5.4, ROOT cannot read neither the files created by the same version of MAUS, nor the ones created by the older version of MAUS.

However, the problems are only with reading the files with the ROOT browser, as a direct python ROOT script can read the files fine, as far as I know.


Files

ROOT_error.txt (6.3 KB) ROOT_error.txt Pradhan, Neetish, 20 June 2013 16:12
04136.root (10.3 MB) 04136.root Pradhan, Neetish, 20 June 2013 19:47
analyze_data_offline.py (1.16 KB) analyze_data_offline.py Pradhan, Neetish, 20 June 2013 19:47
ROOT_error.txt (5.52 KB) ROOT_error.txt Pradhan, Neetish, 20 June 2013 19:47

Related issues

Related to MAUS - Bug #1296: Some datastructure items do not use MAUS_VERSIONED_CLASS_DEF macroClosedRogers, Chris20 June 2013

Actions
#1

Updated by Rogers, Chris over 10 years ago

Can you please attach an output root file, list of datacards used to generate the output root file and any command line tags you used.

It looks like you are using a version of libMausCpp.so that was not used to generate the input data set, but I would like to check.

#2

Updated by Rogers, Chris over 10 years ago

Note there is a feature that we incorrectly set up some version number within the data structure - this is the message like

root [2] Warning in <TStreamerInfo::BuildCheck>: 
   The StreamerInfo of class MAUS::KLEvent read from file maus_output.root
   has the same version (=1) as the active class but a different checksum.
   You should update the version to ClassDef(MAUS::KLEvent,2).
   Do not try to write objects with the current class definition,
   the files will not be readable.

Raised as #1296

#3

Updated by Rogers, Chris over 10 years ago

  • Category set to Data Structure
  • Assignee set to Rogers, Chris
  • Target version set to Future MAUS release
#4

Updated by Pradhan, Neetish over 10 years ago

I tried it again, and I did not get the same warning as quoted, although I did still get an error. I will attach the ROOT file and the error message here.

analyze_data_offline.py was used to generate the ROOT file. I'll attach that as well, just in case. The only command line tags I used were --daq_data_path and --daq_data_file.

#5

Updated by Rajaram, Durga over 10 years ago

What are the outputs of
echo $MAUS_ROOT_DIR $PWD $ROOTSYS
and
ldd $MAUS_ROOT_DIR/build/libMausCpp.so | grep -i root
?

#6

Updated by Pradhan, Neetish over 10 years ago

The output is: /home/maus/MAUS-devel/maus-0.5.4 /home/maus/MAUS-devel/maus-0.5.4 /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07

And of the second command is:

libCore.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so (0x00007f4f6b690000)
libCint.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCint.so (0x00007f4f6ad10000)
libRIO.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libRIO.so (0x00007f4f6a810000)
libNet.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libNet.so (0x00007f4f6a498000)
libHist.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libHist.so (0x00007f4f69d70000)
libGraf.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGraf.so (0x00007f4f69980000)
libGraf3d.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGraf3d.so (0x00007f4f69650000)
libGpad.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGpad.so (0x00007f4f69358000)
libTree.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTree.so (0x00007f4f68f18000)
libRint.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libRint.so (0x00007f4f68ce0000)
libPostscript.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libPostscript.so (0x00007f4f68a70000)
libMatrix.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libMatrix.so (0x00007f4f68610000)
libPhysics.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libPhysics.so (0x00007f4f68370000)
libMathCore.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libMathCore.so (0x00007f4f67f28000)
libThread.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libThread.so (0x00007f4f67cd0000)
libMinuit.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libMinuit.so (0x00007f4f67838000)
libSpectrum.so => /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libSpectrum.so (0x00007f4f67598000)
#7

Updated by Rajaram, Durga over 10 years ago

I assume it crashed when you try to access some member -- which one?
There is (at least, was) a bug in ROOT where it will get unhappy when you try to address a nonexistent member.
Can you plot run number?

#8

Updated by Pradhan, Neetish over 10 years ago

Strange, this time the browser worked better, and loaded the plots fine, until I got to this one: (though I wasn't able to reproduce it; the error occured in one of the TOF data branches)

Error in <TTreeFormula::DefinedVariable>: Unknown method:@GetReconEvents().size() in MAUS::Spill
Error in <TTreeFormula::Compile>: Bad numerical expression : "data._spill.@GetReconEvents().size()"
Fatal: parent && element violated at line 2543 of `/home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/tree/treeplayer/src/TFormLeafInfo.cxx'
aborting
#0 0x0000003aed4abf9e in waitpid () from /lib64/libc.so.6
#1 0x0000003aed43e899 in do_system () from /lib64/libc.so.6
#2 0x00007f0d625e2a38 in TUnixSystem::StackTrace() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#3 0x00007f0d62528024 in DefaultErrorHandler(int, bool, char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#4 0x00007f0d62527791 in ErrorHandler () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#5 0x00007f0d625278c3 in Fatal(char const*, char const*, ...) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#6 0x00007f0d4afb994b in TFormLeafInfoMultiVarDimCollection::TFormLeafInfoMultiVarDimCollection(TClass*, long, TStreamerElement*, TFormLeafInfo*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#7 0x00007f0d4afce2ed in TTreeFormula::ParseWithLeaf(TLeaf*, char const*, bool, unsigned int, TObjArray&, bool, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#8 0x00007f0d4afd41ed in TTreeFormula::DefinedVariable(TString&, int&) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#9 0x00007f0d5ea230e3 in TFormula::Analyze(char const*, int&, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libHist.so
#10 0x00007f0d5ea2cef4 in TFormula::Compile(char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libHist.so
#11 0x00007f0d4afc9170 in TTreeFormula::Init(char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#12 0x00007f0d4afc9951 in TTreeFormula::TTreeFormula(char const*, char const*, TTree*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#13 0x00007f0d4afc0878 in TSelectorDraw::CompileVariables(char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#14 0x00007f0d4afc1292 in TSelectorDraw::Begin(TTree*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#15 0x00007f0d4afdf6b2 in TTreePlayer::Process(TSelector*, char const*, long long, long long) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#16 0x00007f0d4afe5f8a in TTreePlayer::DrawSelect(char const*, char const*, char const*, long long, long long) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#17 0x00007f0d5dafe975 in TVirtualBranchBrowsable::Browse(TBrowser*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTree.so
#18 0x00007f0d4bd119c7 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#19 0x00007f0d4c0b7b10 in G__G__Gui3_413_0_23(G__value*, char const*, G__param*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#20 0x00007f0d61a855ef in Cint::G__CallFunc::Execute(void*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCint.so
#21 0x00007f0d625a29bc in TCint::CallFunc_Exec(void*, void*) const () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#22 0x00007f0d62545ce7 in TQConnection::ExecuteMethod(long*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#23 0x00007f0d6254962d in TQObject::Emit(char const*, long*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#24 0x00007f0d4bd4ed23 in TGListTree::DoubleClicked(TGListTreeItem*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#25 0x00007f0d4bd510e8 in TGListTree::HandleDoubleClick(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#26 0x00007f0d4bd257a1 in TGFrame::HandleEvent(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#27 0x00007f0d4bcf5748 in TGClient::HandleEvent(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#28 0x00007f0d4bcf644b in TGClient::ProcessOneEvent() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#29 0x00007f0d4bcf64bd in TGClient::HandleInput() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#30 0x00007f0d625dfe30 in TUnixSystem::DispatchOneEvent(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#31 0x00007f0d62566e86 in TSystem::InnerLoop() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#32 0x00007f0d6256886b in TSystem::Run() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#33 0x00007f0d6250cbaf in TApplication::Run(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#34 0x00007f0d617e3224 in TRint::Run(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libRint.so
#35 0x000000000040105c in main ()


EDIT: Now I keep getting the same 'Parent and Element violated' error no matter what plot I try to open:

Fatal: parent && element violated at line 2543 of `/home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/tree/treeplayer/src/TFormLeafInfo.cxx'
aborting
#0 0x0000003aed4abf9e in waitpid () from /lib64/libc.so.6
#1 0x0000003aed43e899 in do_system () from /lib64/libc.so.6
#2 0x00007f02e30daa38 in TUnixSystem::StackTrace() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#3 0x00007f02e3020024 in DefaultErrorHandler(int, bool, char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#4 0x00007f02e301f791 in ErrorHandler () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#5 0x00007f02e301f8c3 in Fatal(char const*, char const*, ...) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#6 0x00007f02cbab194b in TFormLeafInfoMultiVarDimCollection::TFormLeafInfoMultiVarDimCollection(TClass*, long, TStreamerElement*, TFormLeafInfo*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#7 0x00007f02cbac62ed in TTreeFormula::ParseWithLeaf(TLeaf*, char const*, bool, unsigned int, TObjArray&, bool, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#8 0x00007f02cbacc1ed in TTreeFormula::DefinedVariable(TString&, int&) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#9 0x00007f02df51b0e3 in TFormula::Analyze(char const*, int&, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libHist.so
#10 0x00007f02df524ef4 in TFormula::Compile(char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libHist.so
#11 0x00007f02cbac1170 in TTreeFormula::Init(char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#12 0x00007f02cbac1951 in TTreeFormula::TTreeFormula(char const*, char const*, TTree*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#13 0x00007f02cbab8878 in TSelectorDraw::CompileVariables(char const*, char const*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#14 0x00007f02cbab9292 in TSelectorDraw::Begin(TTree*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#15 0x00007f02cbad76b2 in TTreePlayer::Process(TSelector*, char const*, long long, long long) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#16 0x00007f02cbaddf8a in TTreePlayer::DrawSelect(char const*, char const*, char const*, long long, long long) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTreePlayer.so
#17 0x00007f02de5f6975 in TVirtualBranchBrowsable::Browse(TBrowser*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libTree.so
#18 0x00007f02cc8099c7 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#19 0x00007f02ccbafb10 in G__G__Gui3_413_0_23(G__value*, char const*, G__param*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#20 0x00007f02e257d5ef in Cint::G__CallFunc::Execute(void*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCint.so
#21 0x00007f02e309a9bc in TCint::CallFunc_Exec(void*, void*) const () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#22 0x00007f02e303dce7 in TQConnection::ExecuteMethod(long*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#23 0x00007f02e304162d in TQObject::Emit(char const*, long*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#24 0x00007f02cc846d23 in TGListTree::DoubleClicked(TGListTreeItem*, int) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#25 0x00007f02cc8490e8 in TGListTree::HandleDoubleClick(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#26 0x00007f02cc81d7a1 in TGFrame::HandleEvent(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#27 0x00007f02cc7ed748 in TGClient::HandleEvent(Event_t*) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#28 0x00007f02cc7ee44b in TGClient::ProcessOneEvent() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#29 0x00007f02cc7ee4bd in TGClient::HandleInput() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libGui.so
#30 0x00007f02e30d7e30 in TUnixSystem::DispatchOneEvent(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#31 0x00007f02e305ee86 in TSystem::InnerLoop() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#32 0x00007f02e306086b in TSystem::Run() () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#33 0x00007f02e3004baf in TApplication::Run(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libCore.so
#34 0x00007f02e22db224 in TRint::Run(bool) () from /home/maus/MAUS-devel/maus-0.5.4/third_party/build/root_v5.34.07/lib/libRint.so
#35 0x000000000040105c in main ()

#9

Updated by Rogers, Chris over 10 years ago

Can you try to repeat the problem with a compiled binary (see, for example, bin/examples/load_root_file_cpp). ROOT interactive mode is notoriously crappy/buggy.

#10

Updated by Pradhan, Neetish over 10 years ago

I tried the load_root_file example, it made two plots of tof1_digits, and they seem fine. The plots do work, it's just the browser that intermittently decides to crash on every single plot. Just as you said about the interactive mode. (I only use it to find out what is where.)

#11

Updated by Rogers, Chris over 10 years ago

  • Status changed from Open to Rejected

It may be we are making some subtly wrong call to ROOT wrong somewhere, or it may be that there is a problem in the TBrowser - I just don't know. It is hard to debug as you can see - so fine to use the TBrowser to figure out the tree structure, but as you have seen it is a more robust work flow to use a compiled binary. If you find a problem in a compiled binary then probably we need to dig further.

To quote the MAUS documentation

In general, working through the ROOT command line or ROOT macros is notoriously unreliable and is not supported by the MAUS development team; it is useful as a basic check of data integrity and no more. 

I will reject this issue but if you find any further problems feel free to reopen or open a new bug.

Also available in: Atom PDF