Dear all, I experience a crash using a TBrowser on a file containing a mixture of histograms and canvases.
Here’s the code (following I will show the traceback of the crash, explain the behaviour causing the crash and, in attach, a copy of the root file).
[code]// g++ -o testTBrowser -I…/include testTBrowser.cpp root-config --cflags --libs
&& ./testTBrowser
#include <TApplication.h>
#include <TBrowser.h>
#include <TFile.h>
TBrowser * tBrowser_ ;
TFile * file_ ;
void doIt(void) ;
//==================================================================
int main(int argc, char** argv)
{
TApplication app(“Folders”,&argc, argv);
doIt() ;
app.Run() ;
return 0 ;
}
//==================================================================
void doIt()
{
file_ = new TFile(“JPsi_evolution.root”) ;
tBrowser_ = new TBrowser(“My files” , file_) ;
tBrowser_->Show() ;
}
[/code]
If I click on a canvas, I get the canvas displayed externally from the TBrowser, if I click on a histogram (if it’s the first thing I do), I get the histogram in the TBrowser inner canvas, but if I click on a histrogram AFTER having displayed a canvas the job crashes with the following traceback:
[quote][menasce@hercules test]$ g++ -o testTBrowser -I…/include testTBrowser.cpp root-config --cflags --libs
&& ./testTBrowser
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x00000036fe29a115 in waitpid () from /lib64/libc.so.6
#1 0x00000036fe23c481 in do_system () from /lib64/libc.so.6
#2 0x00002ac8bdee9c70 in TUnixSystem::StackTrace() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#3 0x00002ac8bdee794a in TUnixSystem::DispatchSignals(ESignals) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#4
#5 0x00000036fe553a38 in main_arena () from /lib64/libc.so.6
#6 0x00002ac8c04240bb in TPad::Clear(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGpad.so
#7 0x00002ac8c040bc05 in TCanvas::Clear(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGpad.so
#8 0x00002ac8bf7ef505 in TH1::Draw(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libHist.so
#9 0x00002ac8bf7e0160 in TH1::Browse(TBrowser*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libHist.so
#10 0x00002ac8c25c8392 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#11 0x00002ac8c29a0991 in G__G__Gui3_391_0_22(G__value*, char const*, G__param*, int) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#12 0x00002ac8be695dc0 in Cint::G__CallFunc::Execute(void*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCint.so
#13 0x00002ac8bdea681c in TCint::CallFunc_Exec(void*, void*) const () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#14 0x00002ac8bde4892b in TQConnection::ExecuteMethod(long*, int) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#15 0x00002ac8bde4cb78 in TQObject::Emit(char const*, long*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#16 0x00002ac8c2606b03 in TGListTree::DoubleClicked(TGListTreeItem*, int) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#17 0x00002ac8c2609d88 in TGListTree::HandleDoubleClick(Event_t*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#18 0x00002ac8c25df42f in TGFrame::HandleEvent(Event_t*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#19 0x00002ac8c25a981b in TGClient::HandleEvent(Event_t*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#20 0x00002ac8c25a9b21 in TGClient::ProcessOneEvent() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#21 0x00002ac8c25a9b9d in TGClient::HandleInput() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#22 0x00002ac8c25a9bbd in TGInputHandler::Notify() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
#23 0x00002ac8bdee72e8 in TUnixSystem::DispatchOneEvent(bool) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#24 0x00002ac8bde66bb6 in TSystem::InnerLoop() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#25 0x00002ac8bde69741 in TSystem::Run() () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#26 0x00002ac8bde0d8af in TApplication::Run(bool) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libCore.so
#27 0x000000000040157c in main ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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 0x00000036fe553a38 in main_arena () from /lib64/libc.so.6
#6 0x00002ac8c04240bb in TPad::Clear(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGpad.so
#7 0x00002ac8c040bc05 in TCanvas::Clear(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGpad.so
#8 0x00002ac8bf7ef505 in TH1::Draw(char const*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libHist.so
#9 0x00002ac8bf7e0160 in TH1::Browse(TBrowser*) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libHist.so
#10 0x00002ac8c25c8392 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /gwterax3/local/root_v5.27.06-qtroot/lib/libGui.so
[/quote]
This same behavior happens in a TBrowser invoked in an interactive root session.
Any help is appreciated.
Dario
JPsi_evolution.root (1.18 MB)