Getting pyroot to run on OSX 6.13

About 3 months ago I got a max running OSX 6.12 and installed root using the binary install and was thrilled to find that pyroot worked out of the box. But then I upgraded Xcode and it no longer worked. so,

I upgraded the OS to 6.13.2, installed Xcode 9.2 (9C40b) and reinstalled the command line tools:

Root itself works fine but pyroot is very unhappy once I ask it to do much. A short test code works ok but I get the following when I try to run a longer script

*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[] (no debug info)
[/Applications/root_v6.12.04/lib/libPyROOT.so] Cppyy::GetDatamemberIndex(long, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) (no debug info)
[/Applications/root_v6.12.04/lib/libPyROOT.so] PyROOT::GetCppGlobal(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) (no debug info)
[/Applications/root_v6.12.04/lib/libPyROOT.so] (anonymous namespace)::LookupCppEntity(_object*, _object*) (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_Call (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyObject_CallFunctionObjArgs (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalFrameEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCodeEx (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyEval_EvalCode (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyRun_FileExFlags (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] PyRun_SimpleFileExFlags (no debug info)
[/System/Library/Frameworks/Python.framework/Versions/2.7/Python] Py_Main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[] (no debug info)

I’m trying to come up with a clean test script - a short version with simple calls works but once I start doing something complex I get the above errors consistently.

Has anyone else seen something similar?

Update on this. By putting in print statements I isolate the issue to the following code:

colors = {1:ROOT.kBlue-6,
2:ROOT.kMagenta-6,
3:ROOT.kRed-6,
4:ROOT.kYellow-6,
5:ROOT.kWhite,
6:ROOT.kWhite,
7:ROOT.kWhite,
8:ROOT.kGreen-6,
9:ROOT.kTeal-6,
11:ROOT.kBlue-10,
12:ROOT.kMagenta-10,
13:ROOT.kRed-10,
14:ROOT.kYellow-10,
15:ROOT.kGray,
16:ROOT.kBlack,
17:ROOT.kBlack,
18:ROOT.kGreen-6,
19:ROOT.kTeal-6}

which runs fine in a standalone test.

substituting the numerical result of the above:

colors = {1: 594, 2: 610, 3: 626, 4: 394, 5: 0, 6: 0, 7: 0, 8: 410, 9: 834, 11: 590, 12: 606, 13: 622, 14: 390, 15: 920, 16: 1, 17: 1, 18: 410, 19: 834}

into the longer program allows the program to complete.

so - strange behavior which I will try to isolate further but not an installation failure.

Yes please - this doesn’t remind me of a known issue.

I’ve found the issue and created a test program to reproduce. The issue was caused by my retaining old ROOT 5.34 voodoo but indicates some fragility in 6.12

If one removes gROOT.Reset() from the following script, it runs fine. If one retains the gROOT.Reset() it crashes when one tries to set the linewidth.

from ROOT import *
from ROOT import gROOT
import numpy as np
import math

print " first line"

enuQE = False
qelike = True

print "reset gROOT"
gROOT.Reset()
print " try gStyle"
try:
gStyle.SetLineWidth(2)
print "tried gStyle"
except:
print “gStyle failed”

print " startup"

Heidi

Hi Heidi,

Ha, thanks! That’s indeed something that we should fix. This is now https://sft.its.cern.ch/jira/browse/ROOT-9171

Axel.

Hi,

Just as an FYI you should put code block inside the triple back-tick block ```, it provides syntax highlighting and separates the code from the text in your message making it more readable:
Typing this:

```python
from ROOT import *

print "Hello world!"
```

Yields:

from ROOT import *

print "Hello world!"

(The language specifier, python in this case, is not always necessary as some auto-deduction is attempted.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.