No canvas displayed


ROOT Version: 6.18
Platform: Linux Mint
Compiler: Not Provided


I have installed ROOT 6.18. When I type canvas on ROOT terminal it shows two warning message, but no canvas is displayed. Even I type c1->Draw(); canvas is not displayed.

TCanvas *c1=new TCanvas(“a”,“a”,1,1,600,600);

Warning in TCanvas::ResizePad: a width changed from 0 to 10

Warning in TCanvas::ResizePad: a height changed from 0 to 10

Try:

root-config --etcdir
ls -al `root-config --etcdir`/system.rootrc

How did you start your session?
Does ROOTs splashscreen show up when you
type just:

 root

Could you show the complete session log
including the start command
Otto

Hi,

When I type root on the terminal it shows ROOT splash screen and then display below message on terminal without any error or warning message.

root-config --etcdir gives output

/home/pc/root/root/etc

and ls -al root-config --etcdir/system.rootrc gives following output

-rw-r–r-- 1 pc pc 33176 Aug 24 15:48 /home/pc/root/root/etc/system.rootrc

So, it seems that the “etc” directory does exist (btw. are you sure that it belongs to the ROOT version that you try to run?).

Is it possible that you have multiple ROOT version installed and their libraries got mixed?
Inspect:

which root
which root.exe
root-config --libdir
echo ${PATH}
echo ${LD_LIBRARY_PATH}

Inspect also all of these files (if you have any, they may contain entries valid for some older / another ROOT version):

ls -la ${HOME} ./ | grep "root[rl]" # .rootrc [.]rootlogon.C

which root O/P is
/home/pc/root/root/bin/roo

which root.exe O/P is
/home/pc/root/root/bin/root.exe

root-config --libdir O/P is
/home/pc/root/root/lib

echo ${PATH} O/P is
/home/pc/root/root//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

echo ${LD_LIBRARY_PATH} O/P is
/home/pc/root/root//lib:/lib:

You may check (it should be “/home/pc/root/root”):

echo ${ROOTSYS}

Did you build your ROOT version on your machine or did you take some “binary distribution” (which may be somehow incompatible with your operating system)?

@axel For the moment I cannot see anything wrong in this setup.

Key questions are:

  • where did you get ROOT from?
  • what does gVirtualX->GetName() show?
    Cheers, Axel.

Note that you should get something like this:

[...]$ root
[... shows the "splash screen" and prints the "Welcome to ROOT" ...]
root [0] gSystem->Getenv("ROOTSYS")
(const char *) "/full/path/to/your/root/distribution"
root [1] gVirtualX->GetName()
(const char *) "Batch"
root [2] new TCanvas()
(TCanvas *) 0x1df98b0
root [3] gVirtualX->GetName()
(const char *) "X11TTF"
root [4] .q
[...]$ 
1 Like

echo ${ROOTSYS} gives
/home/pc/root/root

splashscreen is displayed after typing root on the terminal without any error

root [0]  gSystem->Getenv("ROOTSYS")
(const char *) "/home/pc/root/root"
root [1]  gVirtualX->GetName()
(const char *) "Batch"
root [2]  new TCanvas()
Error in <TGHScrollBar::TGHScrollBar>: arrow_*.xpm not found
Error in <TGVScrollBar::TGVScrollBar>: arrow_*.xpm not found

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fc0162d807a in __GI___waitpid (pid=4247, stat_loc=stat_loc
entry=0x7fffd6f1d540, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007fc016250fbb in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2  0x00007fc016ec6142 in TUnixSystem::StackTrace() () from /home/pc/root/root/lib/libCore.so.6.18
#3  0x00007fc016ec8a13 in TUnixSystem::DispatchSignals(ESignals) () from /home/pc/root/root/lib/libCore.so.6.18
#4  <signal handler called>
#5  0x00007fc0077e4579 in TGHScrollBar::SetPosition(int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#6  0x00007fc007725dab in TGCanvas::Layout() () from /home/pc/root/root/lib/libGui.so.6.18.02
#7  0x00007fc007773284 in TGCompositeFrame::MapSubwindows() () from /home/pc/root/root/lib/libGui.so.6.18.02
#8  0x00007fc007773284 in TGCompositeFrame::MapSubwindows() () from /home/pc/root/root/lib/libGui.so.6.18.02
#9  0x00007fc0078620cd in TRootCanvas::CreateCanvas(char const*) () from /home/pc/root/root/lib/libGui.so.6.18.02
#10 0x00007fc007862b9c in TRootCanvas::TRootCanvas(TCanvas*, char const*, int, int, unsigned int, unsigned int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#11 0x00007fc00786f57e in TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, int, int, unsigned int, unsigned int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#12 0x00007fc009f58a22 in TCanvas::Constructor(char const*, char const*, int) () from /home/pc/root/root/lib/libGpad.so.6.18.02
#13 0x00007fc009f5a3e0 in TCanvas::TCanvas(bool) () from /home/pc/root/root/lib/libGpad.so.6.18.02
#14 0x00007fc017674067 in ?? ()
#15 0x00007fffd6f20240 in ?? ()
#16 0x0000000002677a40 in ?? ()
#17 0x000000000321af60 in ?? ()
#18 0x00007fc01629053c in __GI___libc_free (mem=<optimized out>) at malloc.c:2968
#19 0x00007fc011ec2336 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/pc/root/root/lib/libCling.so
#20 0x00007fc011e6d5b4 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/pc/root/root/lib/libCling.so
#21 0x00007fc011e6edd3 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/pc/root/root/lib/libCling.so
#22 0x00007fc011e6f14c in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /home/pc/root/root/lib/libCling.so
#23 0x00007fc011f0a117 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/pc/root/root/lib/libCling.so
#24 0x00007fc011e0175a in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/pc/root/root/lib/libCling.so
#25 0x00007fc011e17945 in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/pc/root/root/lib/libCling.so
#26 0x00007fc016d75fce in TApplication::ProcessLine(char const*, bool, int*) () from /home/pc/root/root/lib/libCore.so.6.18
#27 0x00007fc01726432e in TRint::ProcessLineNr(char const*, char const*, int*) () from /home/pc/root/root/lib/libRint.so.6.18
#28 0x00007fc0172646b5 in TRint::HandleTermInput() () from /home/pc/root/root/lib/libRint.so.6.18
#29 0x00007fc016ec7e1c in TUnixSystem::CheckDescriptors() () from /home/pc/root/root/lib/libCore.so.6.18
#30 0x00007fc016ec939a in TUnixSystem::DispatchOneEvent(bool) () from /home/pc/root/root/lib/libCore.so.6.18
#31 0x00007fc016de4c71 in TSystem::Run() () from /home/pc/root/root/lib/libCore.so.6.18
#32 0x00007fc016d7407f in TApplication::Run(bool) () from /home/pc/root/root/lib/libCore.so.6.18
#33 0x00007fc017265cde in TRint::Run(bool) () from /home/pc/root/root/lib/libRint.so.6.18
#34 0x00000000004009ba in main ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum 
Only if you are really convinced it is a bug in ROOT then please submit a
report at 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  0x00007fc0077e4579 in TGHScrollBar::SetPosition(int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#6  0x00007fc007725dab in TGCanvas::Layout() () from /home/pc/root/root/lib/libGui.so.6.18.02
#7  0x00007fc007773284 in TGCompositeFrame::MapSubwindows() () from /home/pc/root/root/lib/libGui.so.6.18.02
#8  0x00007fc007773284 in TGCompositeFrame::MapSubwindows() () from /home/pc/root/root/lib/libGui.so.6.18.02
#9  0x00007fc0078620cd in TRootCanvas::CreateCanvas(char const*) () from /home/pc/root/root/lib/libGui.so.6.18.02
#10 0x00007fc007862b9c in TRootCanvas::TRootCanvas(TCanvas*, char const*, int, int, unsigned int, unsigned int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#11 0x00007fc00786f57e in TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, int, int, unsigned int, unsigned int) () from /home/pc/root/root/lib/libGui.so.6.18.02
#12 0x00007fc009f58a22 in TCanvas::Constructor(char const*, char const*, int) () from /home/pc/root/root/lib/libGpad.so.6.18.02
#13 0x00007fc009f5a3e0 in TCanvas::TCanvas(bool) () from /home/pc/root/root/lib/libGpad.so.6.18.02
#14 0x00007fc017674067 in ?? ()
#15 0x00007fffd6f20240 in ?? ()
#16 0x0000000002677a40 in ?? ()
#17 0x000000000321af60 in ?? ()
#18 0x00007fc01629053c in __GI___libc_free (mem=<optimized out>) at malloc.c:2968
#19 0x00007fc011ec2336 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/pc/root/root/lib/libCling.so
#20 0x00007fc011e6d5b4 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/pc/root/root/lib/libCling.so
#21 0x00007fc011e6edd3 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/pc/root/root/lib/libCling.so
#22 0x00007fc011e6f14c in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /home/pc/root/root/lib/libCling.so
#23 0x00007fc011f0a117 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/pc/root/root/lib/libCling.so
#24 0x00007fc011e0175a in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/pc/root/root/lib/libCling.so
===========================================================

root [4]  gVirtualX->GetName()
(const char *) "X11TTF"
root [5] .q

These missing icons should be in $ROOTSYS/icons/. Are they ?

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