What do you expect to see in the example you sent when clicking on Start? If I use as data file “hsimple.root” and “px” instead of “column1”, it seems to work, or at least it does not seem to freeze. When running your macro (ROOT 6.32.04, on WSL2), there are many messages, but the window with the buttons shows up; when clicking on Start, the button changes to Stop, and the mean value is printed; clicking again (the button keeps alternating between “Stop” and “Start”) keeps printing the mean every time, and clicking on Exit quits ROOT:
root
------------------------------------------------------------------
| Welcome to ROOT 6.32.04 https://root.cern |
| (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Aug 14 2024, 04:01:00 |
| From tags/v6-32-04@v6-32-04 |
| With c++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0] .x buttonChangelabel.cpp
In file included from input_line_8:1:
/mnt/c/d/buttonChangelabel.cpp:21:4: warning: 'CheckTObjectHashConsistency' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
ClassDef(MyMainFrame, 0)
^
input_line_4:22:28: note: expanded from macro 'ClassDef'
#define ClassDef(name, id) \
^
input_line_4:9:27: note: expanded from macro '\
_ClassDefInterp_'
virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd { return true; } \
^
/home/daniel/root/include/TGFrame.h:494:4: note: overridden virtual function is here
ClassDefOverride(TGMainFrame,0) // Top level window frame
^
/home/daniel/root/include/Rtypes.h:342:4: note: expanded from macro 'ClassDefOverride'
_ClassDefOutline_(name,id,,override) \
^
/home/daniel/root/include/Rtypes.h:304:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd)
\
^
/home/daniel/root/include/Rtypes.h:275:55: note: expanded from macro '_ClassDefBase_'
/** \cond HIDDEN_SYMBOLS */ virtual_keyword Bool_t CheckTObjectHashConsistency() const overrd
\
^
In file included from input_line_8:1:
/mnt/c/d/buttonChangelabel.cpp:21:4: warning: 'IsA' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
ClassDef(MyMainFrame, 0)
^
input_line_4:22:28: note: expanded from macro 'ClassDef'
#define ClassDef(name, id) \
^
input_line_4:12:28: note: expanded from macro '\
_ClassDefInterp_'
virtual_keyword TClass *IsA() const overrd { return name::Class(); } \
^
/home/daniel/root/include/TGFrame.h:494:4: note: overridden virtual function is here
ClassDefOverride(TGMainFrame,0) // Top level window frame
^
/home/daniel/root/include/Rtypes.h:342:4: note: expanded from macro 'ClassDefOverride'
_ClassDefOutline_(name,id,,override) \
^
/home/daniel/root/include/Rtypes.h:304:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd)
\
^
/home/daniel/root/include/Rtypes.h:294:76: note: expanded from macro '_ClassDefBase_'
/** \return TClass describing current object */ virtual_keyword TClass *IsA() const overrd
\
^
In file included from input_line_8:1:
/mnt/c/d/buttonChangelabel.cpp:21:4: warning: 'ShowMembers' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
ClassDef(MyMainFrame, 0)
^
input_line_4:22:28: note: expanded from macro 'ClassDef'
#define ClassDef(name, id) \
^
input_line_4:13:25: note: expanded from macro '\
_ClassDefInterp_'
virtual_keyword void ShowMembers(TMemberInspector&insp) const overrd { ::ROOT::Class_ShowMembers(name::Class(), this, insp); } \
^
/home/daniel/root/include/TGFrame.h:494:4: note: overridden virtual function is here
ClassDefOverride(TGMainFrame,0) // Top level window frame
^
/home/daniel/root/include/Rtypes.h:342:4: note: expanded from macro 'ClassDefOverride'
_ClassDefOutline_(name,id,,override) \
^
/home/daniel/root/include/Rtypes.h:304:4: note: expanded from macro '_ClassDefOutline_'
_ClassDefBase_(name,id, virtual_keyword, overrd)
\
^
/home/daniel/root/include/Rtypes.h:296:53: note: expanded from macro '_ClassDefBase_'
/** \cond HIDDEN_SYMBOLS */ virtual_keyword void ShowMembers(TMemberInspector &insp) const overrd \
^
In file included from input_line_8:1:
/mnt/c/d/buttonChangelabel.cpp:21:4: warning: 'Streamer' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
ClassDef(MyMainFrame, 0)
^
input_line_4:22:28: note: expanded from macro 'ClassDef'
#define ClassDef(name, id) \
^
input_line_4:14:25: note: expanded from macro '\
_ClassDefInterp_'
virtual_keyword void Streamer(TBuffer&) overrd { ::Error("Streamer", "Cannot stream interpreted class."); } \
^
/home/daniel/root/include/TGFrame.h:494:4: note: overridden virtual function is here
ClassDefOverride(TGMainFrame,0) // Top level window frame
^
/home/daniel/root/include/Rtypes.h:342:4: note: expanded from macro 'ClassDefOverride'
_ClassDefOutline_(name,id,,override) \
^
/home/daniel/root/include/Rtypes.h:314:25: note: expanded from macro '_ClassDefOutline_'
virtual_keyword void Streamer(TBuffer&) overrd;
^
: -0.00382645
root [1] : -0.00382645
: -0.00382645
: -0.00382645
: -0.00382645
user@pc $
If this is expected but not what you see, maybe try a more recent version of ROOT.