Hi everyone, I’m new to Root and, following a tutorial, I was trying to run this macro to plot data that is generated by root.
the program is
# {
# g = new TGraph ();
#
# for (i=0; i<10; i++);
# {
# g->SetPoint(i,i,i*i-4*i+7);
# }
# g->SetMarkerStyle (22);
# g->Draw("ALC");
# }
the output is:
*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::EmitScalarConversion(llvm::Value*, clang::QualType, clang::QualType, clang::SourceLocation) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&, llvm::ArrayRef<clang::Attr const*>) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&, clang::Stmt const*) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (no debug info)
[/Roots/install/lib/libCling.so] clang::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) (no debug info)
[/Roots/install/lib/libCling.so] cling::DeclCollector::HandleTopLevelDecl(clang::DeclGroupRef) (no debug info)
[/Roots/install/lib/libCling.so] cling::IncrementalParser::ParseInternal(llvm::StringRef) (no debug info)
[/Roots/install/lib/libCling.so] cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) (no debug info)
[/Roots/install/lib/libCling.so] cling::Interpreter::EvaluateInternal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (no debug info)
[/Roots/install/lib/libCling.so] cling::Interpreter::process(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) (no debug info)
[/Roots/install/lib/libCling.so] cling::MetaProcessor::readInputFromFile(llvm::StringRef, cling::Value*, unsigned long, bool) (no debug info)
[/Roots/install/lib/libCling.so] TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) /roots/root/core/metacling/src/TCling.cxx:2030
[/Roots/install/lib/libCling.so] TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) /roots/root/core/metacling/src/TCling.cxx:2883
[/Roots/install/lib/libCore.so] TApplication::ExecuteFile(char const*, int*, bool) /roots/root/core/base/src/TApplication.cxx:1137
[/Roots/install/lib/libRint.so] TRint::ProcessLineNr(char const*, char const*, int*) /roots/root/core/rint/src/TRint.cxx:756
[/Roots/install/lib/libRint.so] TRint::HandleTermInput() /roots/root/core/rint/src/TRint.cxx:603
[/Roots/install/lib/libCore.so] TUnixSystem::CheckDescriptors() /roots/root/core/unix/src/TUnixSystem.cxx:1323
[/Roots/install/lib/libCore.so] TMacOSXSystem::DispatchOneEvent(bool) /roots/root/core/macosx/src/TMacOSXSystem.mm:378
[/Roots/install/lib/libCore.so] TSystem::InnerLoop() /roots/root/core/base/src/TSystem.cxx:411
[/Roots/install/lib/libCore.so] TSystem::Run() /roots/root/core/base/src/TSystem.cxx:361
[/Roots/install/lib/libCore.so] TApplication::Run(bool) /roots/root/core/base/src/TApplication.cxx:1154
[/Roots/install/lib/libRint.so] TRint::Run(bool) /roots/root/core/rint/src/TRint.cxx:458
[/Roots/install/bin/./root.exe] main /roots/root/main/src/rmain.cxx:32
[/usr/lib/system/libdyld.dylib] start (no debug info)
[<unknown binary>] (no debug info)
Is anyone able to help me? I’m running root on macOS 10.13
Root version is 6.10/08