Create TCanvas, but no window appears


ROOT Version: 6.16.00
Platform: macOS Mojave 10.14.3
Compiler: Not Provided


I installed ROOT6 on macOS Mojave by Homebrew.
The command “root” works well.
The splash screen and root prompt appear and I can create objects, call functions, execute calculations.

Problem occurs when I create a TCanvas (or draw something: canvas with default setting created automatically).
The following warnings are shown;

root [0] c1 = new TCanvas(“c1”,“c1”,650,400)
Warning in TCanvas::ResizePad: c1 width changed from 0 to 10
Warning in TCanvas::ResizePad: c1 height changed from 0 to 10
(TCanvas *) @0x7ffeed449908

or

root [0] h1 = new TH1D(“h1”,“h1”,10,0,10)
(TH1D *) @0x7ffee7c6e908
root [1] h1->Draw()
Warning in TCanvas::ResizePad: c1 width changed from 0 to 10
Warning in TCanvas::ResizePad: c1 height changed from 0 to 10
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1

In both case, a canvas seems to be created, but no window shows up.
I would like to know the reason of this situation.

I can execute functions of TCanvas such as c1->Destructor() without errors.
However c1->Print(“hoge.pdf”) doesn’t work, i.e. “hoge.pdf” is not created.
The situation is the same when using batch mode.

I already read the following page;


According to the replies there, I checked that the subdirectory “etc/root” is there and contains ROOT’s stuff.
(the reply 5/6 mentions about “config.log” file, but I couldn’t find such a file in my root directory.)

What should I do to solve this?

Actually, I have another MacBook and the ROOT on it works correctly.
The software environment is the same;
OS: macOS Mojave 10.14.3
ROOT: 6.16.00
Xcode: 10.1
XQuartz: 2.7.11 (org-server 1.18.4)
(And what else should I check?)

You are using the X11 version ? not the cocoa one ?

Thank you very much for your help.

Problem has been solved.

It was completely my fault that an old .rootrc existed at home directory,
and Gui.IconPath was linked to the old version of ROOT.

(I had this problem just after I upgraded macOS from Sierra to Mojave and ROOT from 5.34.10 to 6.16.00, too)

After commenting out the line (or removing the .rootrc), a canvas does show up correctly.

I’m sorry for bothering you and thank you again for looking after my topic.

Best,
Kash

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