Error in <RootX11ErrorHandler>

Hi,

I’m trying to figure out what went wrong in this root session.
So what I did was this…

bash:> root -l isotope64Ni.root
ROOT login script!
root [0]
Attaching file isotope64Ni.root as _file0…
root [1] TGraph siid[21];
root [2] {
end with ‘}’, ‘@’:abort > for(int i=0; i<21; i++){
end with ‘}’, ‘@’:abort > TString command = Form("M_QrSi:100
CS_gate+%i*2",i);
end with ‘}’, ‘@’:abort > TString cond = Form(“SiID==%i && VSi>0 && TSi<300”,i);
end with ‘}’, ‘@’:abort > int n = Tree64Ni->Draw(command.Data(),cond.Data(),“goff”);
end with ‘}’, ‘@’:abort > siid[i] = new TGraph(n,Tree64Ni->GetV1(),Tree64Ni->GetV2());
end with ‘}’, ‘@’:abort > siid[i]->SetMarkerStyle(20+(i+1)/10);
end with ‘}’, ‘@’:abort > siid[i]->SetMarkerColor((i+1)%9);
end with ‘}’, ‘@’:abort > }
end with ‘}’, ‘@’:abort > }
root [3] TMultiGraph mg;
root [4] {
end with ‘}’, ‘@’:abort > for(int i=0; i<21; i++){
end with ‘}’, ‘@’:abort > mg.Add(siid[i],“p”);
end with ‘}’, ‘@’:abort > }
end with ‘}’, ‘@’:abort > }
root [5] mg.Draw(“ap”)
TCanvas::MakeDefCanvas: created default TCanvas with name c1
root [6] for(int i=0; i<21; i++) siid[i]->SetMarkerSize(0.05)
root [7] for(int i=0; i<21; i++) siid[i]->SetMarkerSize(0.1)
root [8] Error in : BadMatch (invalid parameter attributes) (TRootCanvas XID: 44040349, XREQ: 42)
TRootCanvas: 44040349

Afte each of the SetMarkerSize statments I clicked in the canvas to update it, the second time I got the RootX11ErrorHandler… I’ve seen this message now and then
since root v3.0. Having search on the forum I’ve found no explanation for this. Is
there one? I’ve had this problem in guis I’ve written, in sessions… everywhere.
The tree has a simple ntuple structure of floats and ints.

Some system info…

my rootlogon.C is
{
cout << “ROOT login script!\n”;
gStyle->SetPadColor(10);
gStyle->SetCanvasColor(10);
gStyle->SetPalette(1);
gStyle->SetFrameFillColor(10);
gStyle->SetTitleFillColor(10);
gStyle->SetStatColor(10);
gStyle->SetFuncWidth(1);
gStyle->SetFuncColor(2);
}

uname -a
Linux ganp605 2.6.26.8-57.fc8 #1 SMP Thu Dec 18 19:19:45 EST 2008 i686 i686 i386 GNU/Linux

root-config --version
5.23/04

root-config --features
asimage astiff builtin_afterimage builtin_ftgl builtin_freetype builtin_pcre builtin_zlib cint5 cintex exceptions fftw3 genvector krb5 ldap mathmore memstat minuit2 opengl python reflex shadowpw shared ssl xft xml xrootd thread

cheers

Joa

Could you post the shortest possible RUNNING script reproducing/simulating the problem?

Rene

Hi Rene,

The answer is no. If I redo exactly what I did, it works. This is the usual behavior
of the “Error in : BadMatch…” in my experience. That is why
I never been bothered with sending a bug report. I can’t reproduce this error, I’ve
never been able to. Not with my GUI’s nor in sessions. But, now and then it pops up
and crashes the session/GUI or whatever root-based application I was running at the time. I always though it was me who’d done something stupid somewhere in the code
but it this example…

kind regards

Joa

I would suggest running your code under valgrind. It is likely that your program overwrites another area of the executable.

Rene