Re: [CINT] Re: [ROOT] TMethodCall::Execute

From: Masaharu Goto (MXJ02154@niftyserve.or.jp)
Date: Mon Nov 24 2003 - 13:37:09 MET


Hello Gero,

Sorry for late reply.  

I thought G__LONGBUF was defined by default for ROOT which increased
G__ONELINE to 4096. If you observe such behavior, G__LONGBUF is
not defined and G__ONELINE is 256.   Let me think how I can prevent
this problem other than increasing the buffer size.

Thank you
Masa Goto



> > In above example, each of a0-a2 has to be shorter than G__ONELINE
> > which is defined as 4096 most of the cases.
> >
> Hi Rene and Masa,
> that is not what I observe.
> I have the following macro which fails if the string is longer than 255
> characters:
> 
> {
> TNamed* name = new TNamed("name", "title");
> cout << name->GetName() << endl;
> TDataMember* thevar = name->IsA()->GetDataMember("fName");
> TMethodCall* setter = thevar->SetterMethod(name->IsA());
> 
> TString param("\" newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newn\"");
> cout << param.Length() << endl;
> setter->Execute(name, param.Data());
> cout << name->GetName() << endl;
> 
> param += "a";
> cout << param.Length() << endl;
> setter->Execute(name, param.Data());
> cout << name->GetName() << endl;
> 
> }
> 
> on 3.04_02, linux, pentium III it produces
> 
> [avalon] ~/h1/oo/devel $ root -l
> root [0] .x macro.C
> name
> 255
>  newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newn
> 256
> Error: String literal syntax error FILE:macro.C LINE:14
> *** Interpreter error recovered ***
> 
>  *** Break *** segmentation violation
>  Generating stack trace...
>  0x401c756d in StackTrace__11TUnixSystem + 0x2e1 from
> /products/ROOT/3.04_02/ROOT-linux24-gcc-2.95.3/lib/libCore.so
>  0x401c5eff in DispatchSignals__11TUnixSystem8ESignals + 0xc7 from
> /products/ROOT/3.04_02/ROOT-linux24-gcc-2.95.3/lib/libCore.so
>  0x401c51a0 in GetSize__C8TWebFile + 0xc4 from
> /products/ROOT/3.04_02/ROOT-linux24-gcc-2.95.3/lib/libCore.so
>  0x401c8e43 in GetSockOpt__11TUnixSystemiiPi + 0x30f from
> /products/ROOT/3.04_02/ROOT-linux24-gcc-2.95.3/lib/libCore.so
>  0x40dfae58 in killpg + 0x58 from /lib/libc.so.6
>  0x4044eba0 in _IO_2_1_stderr_ at
> /data/gcc-2.95.3/hierhinein/gcc/include/new:39 from
> /products/ROOT/3.04_02/ROOT-linux24-gcc-2.95.3/lib/libCore.soR
> 
> and on 3.05_07:
> 
> [avalon] ~/h1/oo/devel $ root -l
> root [0] .x macro.C
> name
> 255
>  newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newn
> 256
> Error: String literal syntax error FILE:macro.C LINE:14
> *** Interpreter error recovered ***
>  newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newname newname newname newname newname
> newname newname newname newname newn
> root [1]
> 
> Cheers
> 
> Gero
> 
> > > Hi Masa,
> > >
> > > Could you answer this question from Gero (was in roottalk)?
> > >
> > > TMethodCall::Execute calls G__CallFunc::SetVars(params)
> > >
> > > What is the maximum length of the params string?
> > > I have the impression that this is defined by G__MAXFUNCPARA
> > > that is set to 40 by default. This is certainly too short in case
> > > of templated arguments.
> > >
> > > Rene
> > >
> > >
> > > Gero Flucke wrote:
> > > >
> > > > Hi!
> > > > I wonder whether (and why if I am right) in
> > > >
> > > > TMethodCall::Execute(void* object, const char* params)
> > > >
> > > > there is a limitation of the length of the string 'params'?
> > > >
> > > > For me it seems that it must not be longer than 255 characters,
> > otherwise
> > > > it crashes - most of the times...
> > > >
> > > > (ROOT 3.04_02 and 3.05_07 on linux, pentium III)
> > > >
> > > > Cheers
> > > >
> > > >         Gero Flucke
> 
> -----------------------------------------------------------------------
> Gero Flucke
> 1a / 603
> DESY
> Notkestr. 85
> 22607 Hamburg
> +49-(0)40-8998-2454
> 
> 



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