X11 problem with root in MAC 10.7.2

Dear root experts,
I am a new user of root in MAC OS. Earlier I was using root in ubuntu and recently switch to
MAC. My problem is that when I run a root macro which require X11 (eg draw histo or graph )
quite frequently it hangs just before the drawing step.
If I see X11 status in dock it says application not responding. I have to kill root by hand to
come out of this.
I tried root 5.28 and 5.30 ( compiled from source and also precompiled binary files)
But problem just do not go away.
I am using
Processor 2.3 GHz Intel Core i5
Memory 4 GB 1333 MHz DDR3
Software Mac OS X Lion 10.7.2 (11C74)

My X11 version is 2.6.3 by Apple. I have not installed any
third party application ( like fink or anything )

One thing I notice that it is in my /Application/Utilities while root I install in
my home directory. Does this make any difference.
Any help will be greatly appreciated.
with best regards,
Vineet Kumar

I have the same configuration.
It is well known that the first drawing takes a bit longer on Mac (x11 loading).
But it produces the plot… it does not hang for ever for me. Then you can even exit root and come back,
all the plots (even the 1st one) are fast now because X11 is there.

Dear Couet,
Many Thanks for your reply. Yes when first time you run root it take a little longer because
X11 is opening. But for me some time plots do not come out at all and X11 in dock says
Application not responding. [ I waited 20 minutes once :frowning: ]
Are you using precompiled binaries or compiled your self. Also is your X11 in /Application/Utilities ?
Does we have to do some thing special to connect root to X11 in MAC
sorry for asking stupid questions but I am a bit new to MAC :slight_smile:

with regards,
Vineet

Compile myself from the trunk. But if you take the right binaries it should not make any differences.
Yes I have X11 in the same place

The only thing I did was to intall X11 and Xcode from the CD coming with my Mac.

It’s worth to check that if the X11 works with the other apps. If you have another application (say, GIMP?) also has trouble with X11, then it’s a problem of the X11 itself.

I had a similar experience. After I updated the mac OS, its X11 doesn’t work anymore. I had to reinstall it.

There seems to be a real issue with X11 on 10.7.2, running as small macro (thanks Olivier), it makes the X11 server hang on 10.7.2 while on 10.7 there is no such problem running the same macro.

{
   TCanvas *c1 = new TCanvas(); 
   TCanvas *c2 = new TCanvas();
   c2->Divide(1,2);

   TH1D * h1 = new TH1D("h1","h1",100,0,1);
   h1->Draw();

   printf(">>> Before Update\n");
   gPad->Update();
   printf("<<< After Update\n");
}

The sequence repdrucing the problem is:

$ root 
root [1] .x bugx11.C
>>> Before Update
<<< After Update\
root [2] .q
$ root 
root [1] .x bugx11.C
>>> Before Update
[hangs here]

Cheers, Fons.

Was this issue ever resolved?

I am having the exact issue for weeks now and I finally thought I would look into it.

You’ve to install XQuartz 2.7.0, see xquartz.macosforge.org/trac/wiki

Cheers, Fons.

And now Apple even gave the same response in reply to the bug report I filed on this issue:

====================================================================
Hi Fons,

This is a courtesy email regarding Bug ID# 10458537.

We believe that this issue has been resolved.

Please use version 2.7.0 or later of XQuartz.

Please let us know whether the issue is resolved for you.

If you have any questions or concerns regarding this issue, please update your report directly (bugreport.apple.com).

Best Regards,

Developer Bug Reporting Team
Apple Worldwide Developer Relations

Apple rolls Xquartz into their new releases, but it is not sure when Xquartz 2.7.0 will go into 10.7.x.

Cheers, Fons.

I had the exact same problem with 10.7.3 + X11 2.6.3. But it was solved by installing XQuartz 2.7.1 as Fons suggested. Thanks a lot.

And Mountain Lion will not even contain X11.app anymore and the user will be redirected to install XQuartz for X11 support. So XQuartz will be it, from now on.

Cheers, Fons.

Btw: our implementation of a native Cocoa+Quartz backend for ROOT is progressing well. :slight_smile:

Hi,

I installed XQuartz 2.7.1 and still have the same problem with root 5.3.2 installed from the source code and built using clang. I logged out and in again as suggested after I installed XQuartz which should make it my default XWindows software.

When I open a TBrowser I can plot at most 2 histograms before the whole thing freezes and I have to kill the xterm and start again (which is what happened before I installed XQuartz).

I am using OS X 10.7.3. This thread is about 10.7.2 so maybe its not the same problem (though the symptoms of freezing up seem the same?). Has anyone had problems using root with 10.7.3 + XQuartz 2.7.1?

Cheers,

Mark

Hi mark,

can you mail me a file and the recipe to reproduce the hangs you observe. We’ve an xcrasher script that hangs X11.app 100% to the times but that works great with XQuartz 2.7.0 and 2.7.1.

Cheers, Fons.

Hi,

I still am having the same issues…its really frustrating I cannot use ROOT on my mac anymore.

Apart from XQuartz are other related software packages I need to update/change to use ROOT with OS X 10.7.3?

Thanks,

Mark

Do you have installed any X11 libs from Fink, MacPorts or any other third parties? If they are all native OSX X11 libs, please post a macro that always crashes so we test it.

Cheers, Fons.

[quote=“rdm”]Do you have installed any X11 libs from Fink, MacPorts or any other third parties? If they are all native OSX X11 libs, please post a macro that always crashes so we test it.

Cheers, Fons.[/quote]

How can I check if I have any “X11 libs from Fink, MacPorts or any other third parties” ?

The problem is not a crash - it is that TBrowser freezes up the terminal and X11 when double-clicking >= 2 histograms in any ROOT file I try (I get the same sometimes when double-clicking TTree branches). I already sent in a PM to you an example ROOT file that causes this issue for me, but as far as I can tell it generalises to all ROOT files I try.

Cheers,

Mark

If you install ROOT from the sources the ./configure command will tell you with X11 will be used.
When I do that on my IMac. I get:

Checking for libX11 ... /usr/X11R6/lib
Checking for X11/Xlib.h ... /usr/include
Checking for X11/xpm.h ... /usr/include
Checking for X11/Xft/Xft.h ... /usr/include
Checking for X11/extensions/shape.h ... /usr/include
Checking for libXpm ... /usr/X11R6/lib
Checking for libXft ... /usr/X11R6/lib
Checking for libXext ... /usr/X11R6/lib

[quote=“markhod”][quote=“rdm”]The problem is not a crash - it is that TBrowser freezes up the terminal and X11 when double-clicking >= 2 histograms in any ROOT file I try (I get the same sometimes when double-clicking TTree branches). I already sent in a PM to you an example ROOT file that causes this issue for me, but as far as I can tell it generalises to all ROOT files I try.
[/quote][/quote]

Hi Mark. I’ve seen similar behavior (canvas with several pads + several histograms replacing each other).
But I have (I think) native X11 app from Apple.
If we find a way to reproduce it with XQuartz, compiled from source, I can debug this problem (either find a bug in ROOT or in XQuartz).

[quote=“couet”]If you install ROOT from the sources the ./configure command will tell you with X11 will be used.
When I do that on my IMac. I get:

Checking for libX11 ... /usr/X11R6/lib Checking for X11/Xlib.h ... /usr/include Checking for X11/xpm.h ... /usr/include Checking for X11/Xft/Xft.h ... /usr/include Checking for X11/extensions/shape.h ... /usr/include Checking for libXpm ... /usr/X11R6/lib Checking for libXft ... /usr/X11R6/lib Checking for libXext ... /usr/X11R6/lib [/quote]

Hello,

Sorry I lost track of this with other work to do…so today I checked out the 5.34 source code from svn.

./configure | grep -i x11 shows

Checking for libX11 … /usr/X11R6/lib
Checking for X11/Xlib.h … /usr/include
Checking for X11/xpm.h … /usr/include
Checking for X11/Xft/Xft.h … /usr/include
Checking for X11/extensions/shape.h … /usr/include
Checking for libXpm … /usr/X11R6/lib
Checking for libXft … /usr/X11R6/lib
Checking for libXext … /usr/X11R6/lib
Checking for freetype-config … /opt/X11/bin/freetype-config
Checking for GL/gl.h … /usr/X11/include
Checking for libGL, or libMesaGL … /usr/X11R6/lib
Checking for libGLU, or libMesaGLU … /usr/X11R6/lib
Checking for png.h … /usr/X11/include
Checking for libpng … /usr/X11/lib
Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_glew, builtin_pcre, builtin_lzma, cintex, explicitlink, fink, genvector, krb5, ldap, memstat, odbc, opengl, pgsql, python, reflex, rpath, shared, ssl, tmva, x11, xft, xml.

I have no idea if that looks as it should…my default X11 App now is XQuartz 2.7.2

I did already try the binary 10.7 OS X 5.34 download and saw the exact issue I described previously.

Cheers,

Mark

Hi,

this should be fine. Does it work?

Cheers, Fons.