Editing a TAxis working for 1 second only

Hello experts,

I have experienced a very strange problem with the editor: when clicking the x axis of a histogram, the pad editor shows up on the left of my TBrowser window. Sometimes editing works, sometimes the axis editor is only shown for <1 second, then some other editor is shown. As you probably didn’t understand the description, here is how to reproduce.

Run the following code (chartree.C):

[code]#include <TBrowser.h>
#include <TFile.h>
#include <TTree.h>


using namespace std;

void createTestFile(const char *filename) {
char c[] = “A”;
auto file = unique_ptr(TFile::Open(filename, “recreate”));
auto tree = new TTree(“t”, “t”);
tree->Branch(“c”, c, “c/C”);

mt19937 rng(0);
for (size_t i = 0; i < 5; ++i) {
    uniform_int_distribution<char> rndChar('A', 'Z');
    c[0] = rndChar(rng);


void chartree() {
const char filename[] = “/tmp/bug.root”;
new TBrowser;
It creates a simple test tree with one /C branch, saves the tree to a file. Then it opens the file and a TBrowser window. Now:
double-click on the file /tmp/bug.root
double-click on the tree "t"
double-click on the branch “c” (a histogram is drawn)
click on View/Editor in the menu (the Pad Editor shows)
click on the x axis

Now the Pad Editor shows the settings for the x axis. However, after approx 1 second?!, it shows “Name: t::Tree” and the axis editor pad is gone. Why does this happen / how can I prevent it from happen?

Unfortunately I don’t know enough about ROOT’s internals, I found the TAxisEditor and the TGedEditor but I am not sure if that is the right place to start searching. Can anyone tell me what is going on here?


I manage to reproduce this very weird behavior… I will debug it and let you know.
For the time being, you can edit your histogram outside the browser

EDIT: You can also use the browser, and simply click on the file (to highlight the file instead of the tree) while using the editor.

Cheers, Bertrand.


This has been fixed in the master and v5-34-00-patches branch. Thanks for reporting the problem!

Cheers, Bertrand.

Thanks a lot!

Had to rebuild ROOT from scratch, but bug is fixed.