Hi Masa, I can reproduce the problem reported by Gero. The problem appears in G__Callfunc::SetArgs(char* params). When passing a string of 256 characters or more (as shown in Gero's script), the following error is printed by CINT: Error: String literal syntax error FILE:gero.C LINE:17 *** Interpreter error recovered *** Rene Gero Flucke wrote: > > On Thu, 13 Nov 2003, Masaharu Goto wrote: > > > Hello Rene, > > > > About length limit of the params argument, itself doesn't have > > direct limit, but each argument separated by ',' has to be less > > than G__ONELINE. > > > > "12345134,aaaaabbbbbbbbbbcccccccccccccc,3.151245" > > <--a0---> <------------a1------------------> <---a2-> > > > > 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:16 MET