RE: [ROOT] crash in TFormLeafInfoClones::GetValue(TLeaf *, int)

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue May 06 2003 - 00:09:37 MEST


Hi,

The problem was related to the fact that pct.amp was a static array of size 4 inside a TClonesArray and pct.xo is just a data member inside the same TClonesArray.  
Hence pct.amp[0][] is a array of size either 4 or 0 (if no element in the clones) and pct.xo is a variable size array of the size of the current clonesArray.  When the clonesArray was of size exactly one, the system was confused and thought that pct.xo was of the same size as pct.amt[0][]. 

'tree->Draw("pct.amp[0]:pct.xo");' and 'tree->Draw("pct.amp[0]:pct.t.xo");' presented the same error but due to different path in the code were failing in different ways.

The fix will be uploaded shortly in the CVS repository.

Cheers,
Philippe.

-----Original Message-----
From: Walter F.J. Mueller [mailto:W.F.J.Mueller@gsi.de]
Sent: Saturday, May 03, 2003 5:48 AM
To: Philippe Canal
Subject: Re: [ROOT] crash in TFormLeafInfoClones::GetValue(TLeaf *, int)


Philippe Canal wrote:
 > Yes I need the file to reproduce the crash (I have no idea what your
  object structure is!)

Please find attached a short .root file with 10 events.

Using root 3.05-04 I get

   tree->Draw("pct.t.amp[][0]:pct.t.xo");    // 1. ok
   tree->Draw("pct.amp[][0]:pct.xo");        // 2. ok, result as 1.
   tree->Draw("pct.t.amp[0][]:pct.t.xo");    // 3. ok
   tree->Draw("pct.t.amp[0]:pct.t.xo");      // 4. ok, result as 3.
   tree->Draw("pct.amp[0]:pct.t.xo");        // 5. ok, result as 3. or 4.
   tree->Draw("pct.t.amp[0]:pct.xo");        // 6. crash
   tree->Draw("pct.amp[0]:pct.xo");          // 7. crash

Using root 3.03-09 the picture is different:

   1. ok
   2. "segmentation violation"
   3. ok
   4. ok
   5. "segmentation violation"
   6. "segmentation violation"
   7. "segmentation violation"

So in 3.03-09 an omitted name part (here ".t") always leads to a crash.


			Thanks for your help,

					Walter

--
Walter F.J. Mueller   Mail:  W.F.J.Mueller@gsi.de
GSI,  Abteilung KP3   Phone: +49-6159-71-2766
D-64291 Darmstadt     FAX:   +49-6159-71-2989
WWW:   http://www-kp3.gsi.de/www/kp3/people/mueller.html



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET