Error in <RootX11ErrorHandler>: BadWindow (invalid Window pa

Hello everyone,
this is my first posting on RootTalk. I just started a project that consists in porting a Root based GUI to a newer Root version & new OS.
The GUI in question was last built with Root v5_16_00 and with SLF4 (Scientific Linux 4).
I am trying to get it to work with Root v5_32_01 and SLF6 .
The code compiled and built fine in the new setting.

But at running time the GUI pops up with minimal colors ( white-black-blue-green) and crashes with this error:

Error in : BadWindow (invalid Window parameter) (XID: 27264007, XREQ: 2)

I checked I had the correct PATH to the X11 rgb.txt file ( following earlier posting suggestions).
But evidently this is not enough.
At this point, I am not sure how to proceed and if this is a X11 problem, a ROOT issue or a combination of both.
I would really appreciate some help.

Thank you very much,

Hi Donatella,

Are you able to run any of the tutorials in $ROOTSYS/tutorials/gui directory?
Can you simply open a TCanvas?

Cheers, Bertrand.

Hi Bertrand,
thanks for the suggestion. I did try and
yes, I can run many of the examples in the tutorials/gui directory. And I can open canvas9es).

This would exclude problems with the installed X11, wouldn’t it?


Hi Donatella,

[quote=“torretta”]This would exclude problems with the installed X11, wouldn’t it?[/quote]Indeed. And also excludes a problem with ROOT installation. So this is most probably a problem with your application…

Cheers, Bertrand.

hi again,
it looks like, although the same application built with ROOT v5_16_00 works just fine, but on SLF4.
I guess I have some debugging to do.

running with gdb I see the following:

: exit MainFrame
Error in : BadMatch (invalid parameter attributes) (XID: 79692807, XREQ: 2)
(gdb) where
#0 0x00110424 in __kernel_vsyscall ()
#1 0x0293ffd9 in __lll_lock_wait () from /lib/
#2 0x0293b3f0 in _L_lock_677 () from /lib/
#3 0x0293b2c1 in pthread_mutex_lock () from /lib/
#4 0x02c0a30b in ?? () from /usr/lib/
#5 0x02c0d94d in XPending () from /usr/lib/
#6 0x02b99929 in TGX11::EventsPending() () from /home/scratch/minos/root/lib/
#7 0x00280a88 in TGClient::ProcessOneEvent() () from /home/scratch/minos/root/lib/
#8 0x00280b7d in TGClient::HandleInput() () from /home/scratch/minos/root/lib/
#9 0x00280bb0 in TGInputHandler::Notify() () from /home/scratch/minos/root/lib/
#10 0x009f4a9d in TUnixSystem::DispatchOneEvent(bool) () from /home/scratch/minos/root/lib/
#11 0x00970794 in TSystem::InnerLoop() () from /home/scratch/minos/root/lib/
#12 0x00972cb9 in TSystem::Run() () from /home/scratch/minos/root/lib/
#13 0x00912a77 in TApplication::Run(bool) () from /home/scratch/minos/root/lib/
#14 0x080e190b in main (argc=1, argv=0xbffff1c4) at RcGuiClient.cpp:354
(gdb) quit

Perhaps this sheds a light on what the source of the problem might be ?

Hi Donatella,

Well, it doesn’t really help… You should build root in debug mode, in order to get more information about the crash. You could also try valgrind, which can point to some potential issues (like uninitialized variables)
And BTW, what is at line 354 of RcGuiClient.cpp?

Cheers, Bertrand.

Thanks again
I’ll try that ( root in debug mode) & valgrind.

The line 354 is:

where theApp is defined as:
TApplication theApp(“App”,&argc,const_cast<char**>(argv));

After line 354 , the RcGuiClient.cpp ends:
return 0;

Thanks so much for your suggestions. Cheers