#include "TFile.h" #include "TTree.h" void main_forum() { TFile f("solo_1.root"); f.GetListOfKeys()->Print(); TTree* t = (TTree*)f.Get("helium_tree"); t->StartViewer(); } /* root [0] Processing main_class.cpp+... Info in : creating shared library /home/sncuser/William/main_enternship/./main_class_cpp.so (TTreeViewer *) 0x3ac5c20 File name : solo_1.root root [1] *** Break *** segmentation violation =========================================================== There was a crash. This is the entire stack trace of all threads: =========================================================== #0 0x00007f4c88e564ca in __GI___waitpid (pid=9634, stat_loc=stat_loc entry=0x7ffce4e47ac0, options=options entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29 #1 0x00007f4c88dcffbb in do_system (line=) at ../sysdeps/posix/system.c:148 #2 0x00007f4c899c8dad in TUnixSystem::StackTrace() () from /opt/root/lib/libCore.so #3 0x00007f4c899cb39c in TUnixSystem::DispatchSignals(ESignals) () from /opt/root/lib/libCore.so #4 #5 0x0000000000000000 in ?? () #6 0x00007f4c71b7eab8 in TTreeViewer::ExecuteDraw() () from /opt/root/lib/libTreeViewer.so #7 0x00007f4c71b83882 in TTreeViewer::ProcessMessage(long, long, long) () from /opt/root/lib/libTreeViewer.so #8 0x00007f4c7146a8e9 in TGFrame::HandleClientMessage(Event_t*) () from /opt/root/lib/libGui.so #9 0x00007f4c714789e1 in TGMainFrame::HandleClientMessage(Event_t*) () from /opt/root/lib/libGui.so #10 0x00007f4c71478ce7 in TGFrame::HandleEvent(Event_t*) () from /opt/root/lib/libGui.so #11 0x00007f4c714fd718 in TGClient::HandleEvent(Event_t*) () from /opt/root/lib/libGui.so #12 0x00007f4c714fda35 in TGClient::ProcessOneEvent() () from /opt/root/lib/libGui.so #13 0x00007f4c714fda9d in TGClient::HandleInput() () from /opt/root/lib/libGui.so #14 0x00007f4c899cbc38 in TUnixSystem::DispatchOneEvent(bool) () from /opt/root/lib/libCore.so #15 0x00007f4c898ce4e4 in TSystem::InnerLoop() () from /opt/root/lib/libCore.so #16 0x00007f4c898cd01f in TSystem::Run() () from /opt/root/lib/libCore.so #17 0x00007f4c898f4d9f in TApplication::Run(bool) () from /opt/root/lib/libCore.so #18 0x00007f4c89d36fd7 in TRint::Run(bool) () from /opt/root/lib/libRint.so #19 0x0000000000400c1c in main () =========================================================== The lines below might hint at the cause of the crash. You may get help by asking at the ROOT forum http://root.cern.ch/forum. Only if you are really convinced it is a bug in ROOT then please submit a report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace from above as an attachment in addition to anything else that might help us fixing this issue. =========================================================== #5 0x0000000000000000 in ?? () #6 0x00007f4c71b7eab8 in TTreeViewer::ExecuteDraw() () from /opt/root/lib/libTreeViewer.so #7 0x00007f4c71b83882 in TTreeViewer::ProcessMessage(long, long, long) () from /opt/root/lib/libTreeViewer.so #8 0x00007f4c7146a8e9 in TGFrame::HandleClientMessage(Event_t*) () from /opt/root/lib/libGui.so #9 0x00007f4c714789e1 in TGMainFrame::HandleClientMessage(Event_t*) () from /opt/root/lib/libGui.so #10 0x00007f4c71478ce7 in TGFrame::HandleEvent(Event_t*) () from /opt/root/lib/libGui.so #11 0x00007f4c714fd718 in TGClient::HandleEvent(Event_t*) () from /opt/root/lib/libGui.so #12 0x00007f4c714fda35 in TGClient::ProcessOneEvent() () from /opt/root/lib/libGui.so #13 0x00007f4c714fda9d in TGClient::HandleInput() () from /opt/root/lib/libGui.so #14 0x00007f4c899cbc38 in TUnixSystem::DispatchOneEvent(bool) () from /opt/root/lib/libCore.so #15 0x00007f4c898ce4e4 in TSystem::InnerLoop() () from /opt/root/lib/libCore.so #16 0x00007f4c898cd01f in TSystem::Run() () from /opt/root/lib/libCore.so #17 0x00007f4c898f4d9f in TApplication::Run(bool) () from /opt/root/lib/libCore.so #18 0x00007f4c89d36fd7 in TRint::Run(bool) () from /opt/root/lib/libRint.so #19 0x0000000000400c1c in main () =========================================================== */ /* root [0] TFile f("solo_1.root") (TFile &) Name: solo_1.root Title: root [1] TTree* t = (TTree*)f.Get("helium_tree"); root [2] t->StartViewer() (TTreeViewer *) 0x36f06c0 File name : solo_1.root root [3] Info in : created default TCanvas with name c1 Info in : created default TCanvas with name c1 */