Window disappearing

When I go into python and call things from ROOT, like TBrowser or TCanvas, the window pops up as it should, but when I try to go into the menus, it vanishes. For example, when I call TBrowser and go into the options menu, everything disappears except the menu. It won’t return until I click back into terminal then into the ROOT icon, but then all of it disappears when I move the cursor to the next menu. It allows me to look at plots and look through folders, but that’s it. However, when I don’t go through python, and I call ROOT directly from the command line, everything works fine. I know one other Mac user who has the same issue and 2 who don’t. We can’t figure out what’s different between us. I’ve also tried switching from ROOT 5.34 to version 6 and had the same issue.

Here’s some version information:
-Mac OS X 10.10
-Python 2.7.9
-ROOT 5.34.26
-XCode 6.1.1
-X11 2.7.7

Root installation:
I followed the direction on this site for installing Root from source:
git clone root.cern.ch/git/root.git
git checkout -b v5-34-26 v5-34-26
./configure --enable-python
make

Thank you!
Brianna


I am not using PyROOT usually. But I just tried on my Mac. With:

Python 2.7.3
OSX 10.10.2
ROOT 5.34/26

I did:

python $ROOTSYS/tutorials/pyroot/demo.py

Then I can open the Browser. It looks fine. Some PyROOT expert may give you more details. I tried with both Cocoa and X11 versions.

Hi,

Python is reference counted. If you do:>>>TBrowser()then the TBrowser object will be bound for a while to the variable ‘’. Next expression, however, that result will be bound to '’, making the reference count of the TBrowser object go to zero, and the object deleted.

Do something like:>>> b = TBrowser()to keep it alive (for the duration of 'b’s life time).

Cheers,
Wim

Thank you for the response, but I tried both of those suggestions and neither worked.

To clarify, it only happens when I try to alter a canvas through the TCanvas GUI.

Thanks
Bri

The only thing I can think has changed in the canvas GUI are the guidelines. Can you try to disable them
by modifying $ROOTSYS/etc/system.rootrc the following way:

Canvas.ShowGuideLines:      false

I do not see why it can create a problem… but who knows…

[quote=“couet”][quote]
To clarify, it only happens when I try to alter a canvas through the TCanvas GUI.
[/quote]

The only thing I can think has changed in the canvas GUI are the guidelines. Can you try to disable them
by modifying $ROOTSYS/etc/system.rootrc the following way:

Canvas.ShowGuideLines:      false

I do not see why it can create a problem… but who knows…[/quote]

Thanks, I tried it, but, unfortunately, it still didn’t work.

Ok, good…

Hi,

tried Mac & Linux, but can’t reproduce it …

Cheers,
Wim

Hi everyone,

I am dealing with the same problem. Also OSX 10.10 and ROOT 5.34.26, but Python 2.7.6.

I am having the suspicion that it has to do with the python distribution I am using. (Enthought python.) Whenever I make matplotlib python plots together with ROOT plots, the behavior reported before gets even more erratic.

I was using the same ROOT version on my old OSX 10.6 (never upgrade a running system) and never had these problems. After I upgraded, I never got the interactive plots to work properly in PYROOT. If I just open ROOT itself, the plots are fine.
Brianna do you also use Enthought python?

Anna

I have the same problem. To be clear, the window is NOT actually being deleted. It just disappears for a bit. Annelles, if you click another Window, then click the Root icon in your dock, it will probably pop back up, as it does in mine. But still quite annoying.

To reproduce issue, I’m running OS X.10, Python 2.7.9, Root 5.34.

I can launch python, import root, make a canvas like normal:

[code]$ python

import ROOT
c1 = ROOT.TCanvas()[/code]
and all is fine… UNTIL I open anything that uses a modal window. So if I click “File” and “Save as”, the “Save As” modal comes up, but the original canvas disappears. At least, until I click another window, and relick the Root icon in the dock.

Would definitely be interested if anyone has a solution!

So I ended up having to reinstall my operating system for other reasons, but when I reinstalled ROOT, everything worked as it should!!

I’m running OS X Version 10.10.4
ROOT 6.04/00
Python 2.7.10
X11 2.7.7
Xcode 6.4

Here’s the method I used to install ROOT:

cd /usr/local
mkdir root
cd root
xcode-select --install
brew install python --enable-shared
git clone -b v6-04-00-patches root.cern.ch/git/root.git root-v6-04
cd root-v6-04
./configure --enable-python --enable-shared
make

In my bash_profile I have
source /usr/local/root/root-v6-04/bin/thisroot.sh
export PATH=/usr/local:$PATH
export PATH=/usr/local/bin:/opt/X11/bin:$PATH

Interesting. I have the exact same setup as bstamas now, and the problem persists. The only difference is I installed Python 2.7 via an installer, not brew.