Re: segfault trying to plot ntuples

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 4 Jun 2010 16:25:10 -0500


Hi,

The problem was fixed by 33097 in the trunk.

     http://root.cern.ch/viewvc?view=rev&revision=33097

You can work around the problem by changing slight your read_dir function:

void read_dir(TDirectory *dir, TCanvas *canvas) {

   TDirectory *dirsav = gDirectory;
   dir->cd(); // Required to work around the problem.

Cheers,
Philippe.

On 6/4/10 3:31 AM, Rene Brun wrote:
> Yes, you are right. Your code works with5.27 but not 5.26.
> I let Philippe comment if he has an idea.
>
> Rene Brun
>
> Suvayu Ali wrote:
>> Hi Rene,
>>
>> On Friday 04 June 2010 12:47 AM, Rene Brun wrote:
>>> I cannot reproduce your problem using your script with no changes and
>>> your files.
>>> I tried on Linux (32 and 64 bits) and mac
>>>
>>
>> After your message I tried with ROOT 5.27/03 and 5.27/02, and the
>> problem isn't there any more. But on using 5.26 it reappears.
>>
>> I am on Fedora 13 x86_64. I can switch to using 5.27 for now. But let
>> me know if I can try something else to confirm whether its some one
>> off problem on my side.
>>
>>> Rene Brun
>>>
>>>
>>>>
>>>> And a sample of the macro is attached. The root files I used are here:
>>>> <http://hep.phys.sfu.ca/~suvayu/4roottalk/>
>>>>
>>>> Backtrace: (ROOT 5.26)
>>>> ======================
>>>>> #8 memcpy () at ../sysdeps/x86_64/memcpy.S:526
>>>>> #9 0x00007f5cb7dcc492 in TBasket::ReadBasketBuffers (this=0x1bcb0d0,
>>>>> pos=576290, len=219, file=0x20f0ee0) at tree/tree/src/TBasket.cxx:367
>>>>> #10 0x00007f5cb7dd9896 in TBranch::GetBasket (this=0x1bcc500,
>>>>> basketnumber=0) at tree/tree/src/TBranch.cxx:1068
>>>>> #11 0x00007f5cb7dd9e05 in TBranch::GetEntry (this=0x1bcc500, entry=0,
>>>>> getall=0) at tree/tree/src/TBranch.cxx:1170
>>>>> #12 0x00007f5cb7667c78 in R__LoadBranch (br=0x1bcc500, entry=0,
>>>>> quickLoad=true) at tree/treeplayer/src/TTreeFormula.cxx:98
>>>>> #13 0x00007f5cb7679b39 in TTreeFormula::EvalInstance (this=0x1bcee20,
>>>>> instance=0, stringStackArg=0x0) at
>>>>> tree/treeplayer/src/TTreeFormula.cxx:3833
>>>>> #14 0x00007f5cb765ede2 in TSelectorDraw::ProcessFill (this=0x1c2fdd0,
>>>>> entry=0) at tree/treeplayer/src/TSelectorDraw.cxx:1091
>>>>> #15 0x00007f5cb769755a in TTreePlayer::Process (this=0x1c30700,
>>>>> selector=0x1c2fdd0, option=0x7f5cb7f1d400 "", nentries=553,
>>>>> firstentry=0)
>>>>> at tree/treeplayer/src/TTreePlayer.cxx:2796
>>>>> #16 0x00007f5cb768dfb1 in TTreePlayer::DrawSelect (this=0x1c30700,
>>>>> varexp0=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)",
>>>>> selection=0x7f5cb7f1d400 "",
>>>>> option=0x7f5cb7f1d400 "", nentries=1000000000, firstentry=0) at
>>>>> tree/treeplayer/src/TTreePlayer.cxx:1073
>>>>> #17 0x00007f5cb7e3a906 in TTree::Draw (this=0x1bcb720,
>>>>> varexp=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)",
>>>>> selection=0x7f5cb7f1d400 "", option=0x7f5cb7f1d400 "",
>>>>> nentries=1000000000, firstentry=0) at tree/tree/src/TTree.cxx:3442
>>>>> #18 0x00007f5cb7e1e7fc in TTree::Draw (this=0x1bcb720,
>>>>> opt=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)") at
>>>>> include/TTree.h:259
>>>>> #19 0x00007f5cb73adce5 in plot (key=0x1b35840, canvas=0x1c374b0) at
>>>>> /home/jallad/codebaby/macros/sample.C:136
>>>>> #20 0x00007f5cb73adbfd in read_dir (dir=0x1b63ad0, canvas=0x1c374b0)
>>>>> at /home/jallad/codebaby/macros/sample.C:121
>>>>> #21 0x00007f5cb73ad59f in overlay () at
>>>>> /home/jallad/codebaby/macros/sample.C:51
>>>>
>>>
>>
>>
>
Received on Fri Jun 04 2010 - 23:25:20 CEST

This archive was generated by hypermail 2.2.0 : Sat Jun 05 2010 - 05:50:01 CEST