Re: Gross CINT runtime error

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Mon, 27 Aug 2007 17:03:16 -0500


.O [0123] all work, .O 4 fails as before. This works after loading the script but before pressing the buttons, so for now I'm going to put gROOT->ProcessLine(".O 3"); into my script.

Re-structuring the code to avoid cascaded signals did not affect the problem.

I'd rather not compile my script, as I want to support it on all OSs, and compiling it is an extra hassle. I tried simply running root and doing ".X HistoRoot.C+", but it gets a zillion errors because there are no #includes (well, just 1 to load the GUI library).

Thanks,

Tom Roberts

Philippe Canal wrote:
> Hi Tom,
>
> Could you try after disabling the CINT optmizer (Cint commend .O 0)?
> Is it an option for you to compile your script (using ACLiC)?
> Can you provide a complete example reproducing the problem?
>
> Cheers,
> Philippe
>
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Tom Roberts
> Sent: Monday, August 27, 2007 3:05 PM
> To: 'ROOT Talk'
> Subject: [ROOT] Gross CINT runtime error
>
> This simple loop hangs forever. Note that ntuples[] has two valid
> pointers (TNtuples with 25 and 15 entries), and nNtuples=2; they are
> both class variables. This is a small part of a large macro entered on
> the root command-line. This code is preparing to fill a TGraph with data
> from multiple TNtuples, and needs to know how many entries to allocate.
>
> // count total entries
> int ntotal=0;
> for(int j=0; j<nNtuples; ++j) {
> TNtuple *ntuple = ntuples[j];
> ntotal += ntuple->GetEntries();
> }
>
>
> So I instrumented it:
> // count total entries
> int ntotal=0;
> //int k=0;
> for(int j=0; j<nNtuples; ++j) {
> //if(++k > 100) break;
> printf("scan total entries A: j=%d\n",j); fflush(stdout);
> TNtuple *ntuple = ntuples[j];
> printf("scan total entries B: j=%d\n",j); fflush(stdout);
> ntotal += ntuple->GetEntries();
> printf("scan total entries C: j=%d\n",j); fflush(stdout);
> }
> printf("scan: nNtuples=%d ntotal=%d\n",nNtuples,ntotal); fflush(stdout);
>
> The output runs forever and begins:
> scan total entries A: j=0
> scan total entries B: j=0
> scan total entries C: j=0
> scan total entries A: j=1
> scan total entries B: j=1
> scan total entries C: j=0
> scan total entries A: j=1
> scan total entries B: j=1
> scan total entries C: j=0
> scan total entries A: j=1
> scan total entries B: j=1
> scan total entries C: j=0
> ... repeat last 3 lines forever
>
> Clearly something is clobbering j. If I give it 3 or more TNtuples in
> ntuples[] and nNtuples, j still gets set to 0 while processing j=1.
>
> The weird part which makes me think this is a CINT problem: If I
> uncomment the two lines referencing k it executes properly (i.e. 2 times
> through the loop).
>
>
> This routine was called in response to the signal from a carriage-return
> entered into a TGTextEntry. Results are identical if it is called in
> response to moving either end of a TGDoubleHSlider. No surprise -- I
> built my own widget containing a TGDoubleHSlider and two TGTextEntry-s,
> and it generates a Changed() signal that was connected to this routine.
> As this smells like a signal problem, I am currently re-structuring my
> code to avoid the cascaded signals....
>
> This is root 5.14 running on Mac OS X (Intel). On Linux it also hangs in
> response to that <CR>, but I did not track it down.
>
>
> Tom Roberts
>
>
Received on Tue Aug 28 2007 - 00:08:00 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 28 2007 - 05:50:02 CEST