# TCanvas fails in 6.36 with web-browser

**URL:** <https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754>\
**Category:** ROOT\
**Created:** [June 19, 2025, 12:27am UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754 "2025-06-19T00:27:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![preimer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@preimer](https://root-forum.cern.ch/u/preimer)\
**Post date:** [June 19, 2025, 12:27am UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/1 "2025-06-19T00:27:02Z")

</div>

I recently tried to upgrade to ROOT 6.36.000. It compiled fine. The cmake and make logs are in  
[root-6.36.00.cmake.txt](https://root-forum.cern.ch/uploads/short-url/6Qyi32pL2UGahLwoMTqYDiq0zqp.txt) (13.7 KB) and [root-6.36.00.make.txt](https://root-forum.cern.ch/uploads/short-url/3qKoXt6CEhBrsBaq7usYgHuZsPn.txt) (555.6 KB)

After the successful build and install, I tried to open a TCanvas with the simple  
`root [0] TCanvas a`  
crashes. The complete error message is in [myRoot.txt](https://root-forum.cern.ch/uploads/short-url/vHCRTn7liL5ts6piDAwBGTLHGw6.txt) (5.9 KB). I have not been able to find much to go on here, except that  
`root [0] TBrowser a`  
works perfectly, and opens the TBrowser in a web browser window. I had presumed that the first thing TBrowser would do would be to open a TCanvas, but apparently there is more to it.

I’m running Mac OSX 15.5 and Xcode 16.4.

Thanks,

Paul

```auto
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.000 https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Jun 18 2025, 22:42:11 |
  | From tags/6-36-000@6-36-000 |
  | With Apple clang version 17.0.0 (clang-1700.0.13.5) |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

```

* * *

_ROOT Version:_ 6.36.000  
_Platform:_ macosxarm64  
_Compiler:_ Apple clang version 17.0.0 (clang-1700.0.13.5)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 19, 2025, 6:43am UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/2 "2025-06-19T06:43:22Z")

</div>

I guess @linev can help

---

<div class="post-metadata">

**Author:** ![preimer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@preimer](https://root-forum.cern.ch/u/preimer)\
**Post date:** [June 19, 2025, 5:03pm UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/3 "2025-06-19T17:03:30Z")

</div>

Solution with a question:

Short answer:  
Using the option `--web` solves the problem (see transcript below)

```auto
root --web            
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.000 https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Jun 18 2025, 22:42:11 |
  | From tags/6-36-000@6-36-000 |
  | With Apple clang version 17.0.0 (clang-1700.0.13.5) |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

rootLogon
(int) 1
root [0] TCanvas c
Info in <THttpEngine::Create>: Starting HTTP server on port 127.0.0.1:9282
(TCanvas &) Name: c1 Title: c1
root [1] TH2D *my2d = new TH2D("my2d", "my2d", 100, 0, 1, 100, 0, 1)
(TH2D *) 0x12f00e800
root [2] my2d->Draw()
root [3] .q

```

_Question:_ If --web is the default, as I can see by it opening TBrowser correctly, why do I need to specify that option on the command line if I open TCanvas? I am puzzled by the difference in behavior between TBrowser and TCanvas in terms of the simple opening of a canvas. Not a problem, since I will just redefine my root alias to include --web, but curious?

Long answer:  
Following @couet’s reply, I looked at @linev’s post [\<TBrowser::TBrowser\>: The ROOT browser cannot run in batch mode - #3 by linev](https://root-forum.cern.ch/t/tbrowser-tbrowser-the-root-browser-cannot-run-in-batch-mode/51908/3). There I see that specifying a server and port with the --web=server:port option might be a useful idea. It worked somewhat, in that I had to open a browser (did not automatically appear) and go to the web site printed after the TCanvas call _before the TCanvas call timed out_. Then I could draw on that canvas.

```auto
root [0] TCanvas c
Info in <THttpEngine::Create>: Starting HTTP server on port 127.0.0.1:9898
New web window: http://localhost:9898/win1/?key=5a78e0ae-9c816620-0da8db97-4d460f9a-523e16fc-63f0b5ca-c252eac2-0249c657#52620503-0ac0503c-eb262a91-528834e2-4eb7f603-055ff6cf-f0aab3e3-3863227f
(TCanvas &) Name: c1 Title: c1

```

This prompted me to try it without specifying the server:port.

Paul

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [June 23, 2025, 11:25am UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/4 "2025-06-23T11:25:21Z")

</div>

Hi Paul,

Grate that you found a solution which works for you.  
But can we investigate a bit - why it does not work by default?  
Can you start root and check if it automatically goes in batch mode?  
Just start root without any arguments and type:

```auto
root [0] gROOT->IsBatch()

```

For me it returns false.  
And for you?

Regards,  
Sergey

---

<div class="post-metadata">

**Author:** ![preimer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@preimer](https://root-forum.cern.ch/u/preimer)\
**Post date:** [June 23, 2025, 1:29pm UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/5 "2025-06-23T13:29:37Z")

</div>

IsBatch is false.

```auto
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.000 https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Jun 18 2025, 22:42:11 |
  | From tags/6-36-000@6-36-000 |
  | With Apple clang version 17.0.0 (clang-1700.0.13.5) |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

rootLogon
(int) 1
root [0] gROOT->IsBatch()
(bool) false
root [1] 

```

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [June 23, 2025, 1:37pm UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/6 "2025-06-23T13:37:43Z")

</div>

Hi,

> [@preimer](#):
>
> IsBatch is false.

Then ROOT behaves as it supposed. By default it shows new web-based TBrowser,  
but still classical TCanvas. And If I understand correctly - you have crash when running `TCanvas`.  
Using `root --web` just switches you to newer web-based canvas.

From your [myRoot.txt](https://root-forum.cern.ch/uploads/short-url/vHCRTn7liL5ts6piDAwBGTLHGw6.txt) one can see that problem is in `libpng`.  
There are several posts on the forum having similar problem on mac:

> [@macOS15.4 + XCode. 16.3 + homebrew: Still having trouble on v6.34.08](https://root-forum.cern.ch/t/macos15-4-xcode-16-3-homebrew-still-having-trouble-on-v6-34-08/63329):
>
> Maybe I’m doing something wrong but things are still broken when I try to get the fixed ROOT version for Sequoia 15.4 + Xcode 16.3 through homebrew. Made sure brew points to 6.34.08 after the latest commit (920df531afd46056e409fbd21f6d3f5959da075b) to the default branch. Tried “brew upgrade root” first, didn’t work. Then uninstalled root, reinstalled it. Still doesn’t work. Launching the ROOT interpreter fails. Getting the ROOT version also fails. Need some help figuring out what I’m doing wrong…

> [@Problem in root installation due to AfterImage](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270):
>
> Hello, I am trying to install root v6.32.10 on my Mac from the source. Here are the cmake flags: cmake -DCMAKE\_INSTALL\_PREFIX=/Users/arkasantra/Root6\_Install -DPython3\_EXECUTABLE=python3 -DCMAKE\_CXX\_STANDARD=20 -Dbuiltin\_nlohmannjson=ON -Dhttp=ON -Droot7=ON -Dbuiltin\_xrootd=ON -Dxrootd=ON -Dbuiltin\_glew=ON /Users/arkasantra/root-6.32.10 The configuration output is the following: When I am building the directory, I am getting this error: CMake Error at /Users/arkasantra/Root6\_Build/AFTERIMA…

Maybe installation of libpng and re-build of ROOT will help you.

Regards,  
Sergey

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 7, 2025, 1:38pm UTC](https://root-forum.cern.ch/t/tcanvas-fails-in-6-36-with-web-browser/63754/7 "2025-07-07T13:38:30Z")

</div>

Closed on July 7, 2025, 1:38pm UTC

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