Hello. I’m learning root program to study high-energy physics.
I used the Draw method to draw graphs. But, it won’t work, and Break Segmentation violation.
This is the code that called error…
root [0] TF1 f1(“f1”,“sin(x)/x”,0.,10.)
(TF1 &) Name: f1 Title: sin(x)/x
root [1] f1.Draw()
Then, this is the error message.
*** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[] (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::getPropertiesAtIndexInternal(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] IIOImageSource::copyPropertiesAtIndex(unsigned long, IIODictionary*) (no debug info)
[/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO] CGImageSourceCopyPropertiesAtIndex (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] ImageSourceOptionsForCGImageSource_index_ (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSBitmapImageRep _imagesWithData:hfsFileType:extension:zone:expandImageContentNow:includeAllReps:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSBitmapImageRep _imageRepsWithData:hfsFileType:extension:expandImageContentNow:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] +[NSImageRep _imageRepsWithContentsOfURL:expandImageContentNow:giveUpOnNetworkURLsWithoutGoodExtensions:] (no debug info)
[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit] -[NSImage initWithContentsOfURL:] (no debug info)
[/usr/local/lib/libGCocoa.so] TGCocoa::SetApplicationIcon() (no debug info)
[/usr/local/lib/libGCocoa.so] TGCocoa::MapWindow(unsigned long) (no debug info)
[/usr/local/lib/libGui.so] TGStatusBar::TGStatusBar(TGWindow const*, unsigned int, unsigned int, unsigned int, unsigned long) (no debug info)
[/usr/local/lib/libGui.so] TRootCanvas::CreateCanvas(char const*) (no debug info)
[/usr/local/lib/libGui.so] TRootCanvas::TRootCanvas(TCanvas*, char const*, int, int, unsigned int, unsigned int) (no debug info)
[/usr/local/lib/libGui.so] TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, int, int, unsigned int, unsigned int) (no debug info)
[/usr/local/lib/libGpad.so] TCanvas::Constructor(char const*, char const*, int) (no debug info)
[/usr/local/lib/libGpad.so] TCanvas::TCanvas(char const*, char const*, int) (no debug info)
[/usr/local/lib/libGpad.so] TCanvas::MakeDefCanvas() (no debug info)
[] (no debug info)
[/usr/local/lib/libCling.so] cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::EvaluateInternal(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::process(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::Value*, cling::Transaction**, bool) (no debug info)
[/usr/local/lib/libCling.so] cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) (no debug info)
[/usr/local/lib/libCling.so] HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) (no debug info)
[/usr/local/lib/libCling.so] TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) (no debug info)
[/usr/local/lib/libCore.so] TROOT::ProcessLine(char const*, int*) (no debug info)
[/usr/local/lib/libCore.so] TObject::AppendPad(char const*) (no debug info)
[/usr/local/lib/libHist.so] TF1::Draw(char const*) (no debug info)
[/usr/local/lib/libCling.so] cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::EvaluateInternal(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (no debug info)
[/usr/local/lib/libCling.so] cling::Interpreter::process(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, cling::Value*, cling::Transaction**, bool) (no debug info)
[/usr/local/lib/libCling.so] cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) (no debug info)
[/usr/local/lib/libCling.so] HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) (no debug info)
[/usr/local/lib/libCling.so] TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) (no debug info)
[/usr/local/lib/libRint.so] TRint::ProcessLineNr(char const*, char const*, int*) (no debug info)
[/usr/local/lib/libRint.so] TRint::HandleTermInput() (no debug info)
[/usr/local/lib/libCore.so] TUnixSystem::CheckDescriptors() (no debug info)
[/usr/local/lib/libCore.so] TMacOSXSystem::DispatchOneEvent(bool) (no debug info)
[/usr/local/lib/libCore.so] TSystem::InnerLoop() (no debug info)
[/usr/local/lib/libCore.so] TSystem::Run() (no debug info)
[/usr/local/lib/libCore.so] TApplication::Run(bool) (no debug info)
[/usr/local/lib/libRint.so] TRint::Run(bool) (no debug info)
[/usr/local/bin/root.exe] main (no debug info)
[/usr/lib/dyld] start (no debug info)
I’m using M1 macbook pro and its version is ventura 13.2 .
My root version is 6.26.10. I installed it using “brew install root” .
I run root in the terminal, and other functions work well except draw() (+ other graphical function do not work) .
When I run draw() method, an root.exe file is created in the dock and the error message as above is printed.
Please Help me!