So this is somewhat related to this [url=https://root-forum.cern.ch/t/problems-compiling-on-os-x-10-9/16774/1 thread on problems compiling on OS x 10.9[/url]. I got to the point where I got root built and other stand alone applications (that creates tree root files) dependent on the root libs to build. The problem now is that it fails to read any of my *.root files, so hence this new thread.
It would crash when I try to spawn the StartViewer() or when a script tries to read from the root tree. So to make sure that this has nothing to do with any of my code (which worked with the previous version of root prior to upgrading to OS X 10.9!), I"m going to go and demonstrate using the root tutorials, that the newly built root crashes on reading a root tree (you can load it, but you can’t read it!).
So here are the steps I took, making sure I was a picking up the correct root version, which I currently built locally and using the tutorial cernbuild.C script to generate the tree root file:
[code]jade-mbp:~ jade$ cd root
jade-mbp:root jade$ ls
CMakeLists.txt config geom lib proof
LICENSE config.log graf2d macros roofit
Makefile config.status graf3d main rootx
README configure gui man sql
bin core hist math test
bindings doc html misc tmva
build docbook icons montecarlo tree
cint etc include myConfig.log tutorials
cmake fonts io net
jade-mbp:root jade$ pwd
/Users/jade/root
jade-mbp:root jade$ source bin/thisroot.sh
jade-mbp:tree jade$ which root
/Users/jade/root/bin/root
jade-mbp:root jade$ echo $ROOTSYS
/Users/jade/root
jade-mbp:root jade$ cd $ROOTSYS/tutorials/tree
jade-mbp:tree jade$ ls
JetEvent.cxx copytree2.C parallelcoordtrans.C
JetEvent.h copytree3.C printSizes.C
basic.C drawsparse.C spider.C
basic.dat h1analysis.C staff.C
basic2.C h1analysis.h tcl.C
bill.C h1analysisProxy.C tree.C
cernbuild.C h1analysisProxy.h tree0.C
cernstaff.C h1analysisProxyCut.C tree1.C
cernstaff.dat h1chain.C tree2.C
cernstaff.root hsimpleProxy.C tree2a.C
circular.C htest.C tree3.C
clonesA_Event.C hvector.C tree4.C
clonesA_Event.cxx jets.C treefriend.C
clonesA_Event.h ntuple1.C tv3.C
copytree.C parallelcoord.C tvdemo.C
jade-mbp:tree jade$ which root
/Users/jade/root/bin/root
jade-mbp:tree jade$ root
-
*
-
W E L C O M E to R O O T *
-
*
- Version 5.34/10 29 August 2013 *
-
*
- You are welcome to visit our Web site *
-
http://root.cern.ch *
-
*
ROOT 5.34/10 (heads/v5-34-00-patches@v5-34-10-209-gacffe1f, Oct 26 2013, 13:43:49 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .x cernbuild.C
*Tree :T : CERN 1988 staff data *
*Entries : 3354 : Total = 176207 bytes File Size = 15005 *
-
: : Tree compression factor = 2.74 *
*Br 0 :Category : Category/I *
*Entries : 3354 : Total Size= 14062 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 1 :Flag : Flag/i *
*Entries : 3354 : Total Size= 14038 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 2 :Age : Age/I *
*Entries : 3354 : Total Size= 14032 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 3 :Service : Service/I *
*Entries : 3354 : Total Size= 14056 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 4 :Children : Children/I *
*Entries : 3354 : Total Size= 14062 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 5 :Grade : Grade/I *
*Entries : 3354 : Total Size= 14044 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 6 :Step : Step/I *
*Entries : 3354 : Total Size= 14038 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 7 :Hrweek : Hrweek/I *
*Entries : 3354 : Total Size= 14050 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 8 :Cost : Cost/I *
*Entries : 3354 : Total Size= 14038 bytes One basket in memory *
*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 *
…
*Br 9 :Division : Division/C *
*Entries : 3354 : Total Size= 25315 bytes File Size = 8325 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.49 *
…
*Br 10 :Nation : Nation/C *
*Entries : 3354 : Total Size= 24198 bytes File Size = 6680 *
Baskets : 1 : Basket Size= 32000 bytes Compression= 3.05 *
…
(class TFile)0x0
root [1] .q
jade-mbp:tree jade$ ls -l *.root
-rw-r–r-- 1 jade staff 52146 Oct 26 16:01 cernstaff.root
jade-mbp:tree jade$ root
-
*
-
W E L C O M E to R O O T *
-
*
- Version 5.34/10 29 August 2013 *
-
*
- You are welcome to visit our Web site *
-
http://root.cern.ch *
-
*
ROOT 5.34/10 (heads/v5-34-00-patches@v5-34-10-209-gacffe1f, Oct 26 2013, 13:43:49 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TFile f(“cernstaff.root”)
root [1] f.ls()
TFile** cernstaff.root
TFile* cernstaff.root
KEY: TTree T;1 CERN 1988 staff data
root [2] T->StartViewer()
*** Break *** segmentation violation
Thread 1 (Thread 0x1503 of process 726):
#0 0x00007fff85ea6e3a in ?? ()
#1 0x00007fff8dfb9130 in ?? ()
#2 0x00007fff8dfc38b1 in ?? ()
#3 0x00007fff8dfc38b4 in ?? ()
#4 0x00007f8914fb99a0 in ?? ()
#5 0x0000000000000000 in ?? ()
Root >
[/code]
So what I’ve demonstrated above is that I source the correct root version (newly built one), verified that the ROOTSYS environment variable was setup correctly. Used the tutorial cernbuild.C code to generate a simple tree file cernstaff.root. Restarted root, having verified that the root file was created and then attempted to load it (which seems to load fine). Then tried to start the viewer, which then crashes.
Now I tried other commands (having reloaded the the root file again) and some of the simple commands works, but once I tried to spawn the StartViewer(), it crashes:
[code]jade-mbp:tree jade$ ls *.root
cernstaff.root
jade-mbp:tree jade$ root
-
*
-
W E L C O M E to R O O T *
-
*
- Version 5.34/10 29 August 2013 *
-
*
- You are welcome to visit our Web site *
-
http://root.cern.ch *
-
*
ROOT 5.34/10 (heads/v5-34-00-patches@v5-34-10-209-gacffe1f, Oct 26 2013, 13:43:49 on macosx64)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TFile f(“cernstaff.root”)
root [1] f.ls()
TFile** cernstaff.root
TFile* cernstaff.root
KEY: TTree T;1 CERN 1988 staff data
root [2] T->Show(10)
======> EVENT:10
Category = 361
Flag = 15
Age = 51
Service = 29
Children = 0
Grade = 7
Step = 13
Hrweek = 40
Cost = 7599
Division = PS
Nation = FR
root [3] T->Print()
*Tree :T : CERN 1988 staff data *
*Entries : 3354 : Total = 338757 bytes File Size = 47247 *
-
: : Tree compression factor = 3.69 *
*Br 0 :Category : Category/I *
*Entries : 3354 : Total Size= 27550 bytes File Size = 4919 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.74 *
…
*Br 1 :Flag : Flag/i *
*Entries : 3354 : Total Size= 27522 bytes File Size = 2165 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 6.23 *
…
*Br 2 :Age : Age/I *
*Entries : 3354 : Total Size= 27515 bytes File Size = 3489 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 3.86 *
…
*Br 3 :Service : Service/I *
*Entries : 3354 : Total Size= 27543 bytes File Size = 2214 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 6.09 *
…
*Br 4 :Children : Children/I *
*Entries : 3354 : Total Size= 27550 bytes File Size = 2110 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 6.39 *
…
*Br 5 :Grade : Grade/I *
*Entries : 3354 : Total Size= 27529 bytes File Size = 2676 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 5.04 *
…
*Br 6 :Step : Step/I *
*Entries : 3354 : Total Size= 27522 bytes File Size = 2889 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.67 *
…
*Br 7 :Hrweek : Hrweek/I *
*Entries : 3354 : Total Size= 27536 bytes File Size = 642 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 21.01 *
…
*Br 8 :Cost : Cost/I *
*Entries : 3354 : Total Size= 27522 bytes File Size = 6939 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.94 *
…
*Br 9 :Division : Division/C *
*Entries : 3354 : Total Size= 46046 bytes File Size = 10048 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 2.46 *
…
*Br 10 :Nation : Nation/C *
*Entries : 3354 : Total Size= 44593 bytes File Size = 7928 *
*Baskets : 2 : Basket Size= 32000 bytes Compression= 2.98 *
…
root [4] T->Scan(“Cost:Age:Children”)
- Row * Cost * Age * Children *
-
0 * 11975 * 58 * 0 *
-
1 * 10228 * 63 * 0 *
-
2 * 10730 * 56 * 2 *
-
3 * 9311 * 61 * 0 *
-
4 * 9966 * 52 * 2 *
-
5 * 7599 * 60 * 0 *
-
6 * 9868 * 53 * 1 *
-
7 * 8012 * 60 * 1 *
-
8 * 8813 * 51 * 0 *
-
9 * 7850 * 56 * 1 *
-
10 * 7599 * 51 * 0 *
-
11 * 9315 * 54 * 2 *
-
12 * 7599 * 54 * 0 *
-
13 * 7892 * 46 * 0 *
-
14 * 7850 * 54 * 1 *
-
15 * 7599 * 57 * 0 *
-
16 * 8137 * 55 * 0 *
-
17 * 7850 * 55 * 1 *
-
18 * 7294 * 57 * 1 *
-
19 * 8101 * 51 * 2 *
-
20 * 5720 * 54 * 0 *
-
21 * 15832 * 57 * 1 *
-
22 * 12226 * 63 * 1 *
-
23 * 13135 * 56 * 0 *
-
24 * 9617 * 49 * 0 *
Type to continue or q to quit ==> q
(Long64_t)25
root [5] T->StartViewer()
*** Break *** segmentation violation
Thread 1 (Thread 0x1503 of process 776):
#0 0x00007fff85ea6e3a in ?? ()
#1 0x00007fff8dfb9130 in ?? ()
#2 0x00007fff8dfc38b1 in ?? ()
#3 0x00007fff8dfc38b4 in ?? ()
#4 0x00007f852ab3bf00 in ?? ()
#5 0x0000000000000000 in ?? ()
Root >
[/code]
I’m having similar issues with my existing root files and scripts that attempts to read root files to process. But having used a simple tutorial file from the root source, demonstrates that this problem is not from my root files and my scripts. Could someone help? Thanks!