TGFileBrowser::DoubleClicked Crash

I am trying to embed a TGFileBrowser inside a TGCompositeFrame. This is all within a TEveManager that also contains a Canvas. The goal is to be able to doubleclick a histogram in the file browser and have it get drawn to the canvas. Currently, histograms can be dragged-and-dropped to the canvas, but double-clicking will cause a crash:

[code] *** Break *** segmentation violation

There was a crash.
This is the entire stack trace of all threads:

#0 0x00007f7abaecd9be in waitpid () from /lib/x86_64-linux-gnu/
#1 0x00007f7abae52f4e in ?? () from /lib/x86_64-linux-gnu/
#2 0x00007f7abbb7fb17 in TUnixSystem::StackTrace() () from /home/elem/root/lib/
#3 0x00007f7abbb82473 in TUnixSystem::DispatchSignals(ESignals) () from /home/elem/root/lib/
#5 0x00007f7ab5538135 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /home/elem/root/lib/
#6 0x00007f7ab58e1856 in G__G__Gui3_421_0_23(G__value*, char const*, G__param*, int) () from /home/elem/root/lib/
#7 0x00007f7aba2f07cf in Cint::G__CallFunc::Execute(void*) () from /home/elem/root/lib/
#8 0x00007f7abbb3faec in TCint::CallFunc_Exec(void*, void*) const () from /home/elem/root/lib/
#9 0x00007f7abbadfef5 in TQConnection::ExecuteMethod(long*, int) () from /home/elem/root/lib/
#10 0x00007f7abbae35e7 in TQObject::Emit(char const*, long*) () from /home/elem/root/lib/
#11 0x00007f7ab5574b93 in TGListTree::DoubleClicked(TGListTreeItem*, int) () from /home/elem/root/lib/
#12 0x00007f7ab5578d18 in TGListTree::HandleDoubleClick(Event_t*) () from /home/elem/root/lib/
#13 0x00007f7ab554b126 in TGFrame::HandleEvent(Event_t*) () from /home/elem/root/lib/
#14 0x00007f7ab551d1eb in TGClient::HandleEvent(Event_t*) () from /home/elem/root/lib/
#15 0x00007f7ab551d345 in TGClient::ProcessOneEvent() () from /home/elem/root/lib/
#16 0x00007f7ab551d3ad in TGClient::HandleInput() () from /home/elem/root/lib/
#17 0x00007f7abbb82b58 in TUnixSystem::DispatchOneEvent(bool) () from /home/elem/root/lib/
#18 0x00007f7abbb01176 in TSystem::InnerLoop() () from /home/elem/root/lib/
#19 0x00007f7abbb02e54 in TSystem::Run() () from /home/elem/root/lib/
#20 0x00007f7abbaa4f0f in TApplication::Run(bool) () from /home/elem/root/lib/
#21 0x00007f7abb6f583c in TRint::Run(bool) () from /home/elem/root/lib/
#22 0x0000000000400f5c 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 Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x00007f7ab5538135 in TGFileBrowser::DoubleClicked(TGListTreeItem*, int) () from /home/elem/root/lib/


I have constucted a small self-contained script that reproduces the problem.

TCanvas* canvas = new TCanvas();

TEveWindowSlot* slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabLeft());
TEveWindowFrame* frame = slot->MakeFrame();
TGCompositeFrame* cf = frame->GetGUICompositeFrame();
TBrowser* b;
TGFileBrowser* filebrowser = new TGFileBrowser(cf,b,240,400);
TH1D* h1=new TH1D(“h1”,“h1”,10,0,10);
cf->AddFrame(filebrowser, new TGLayoutHints(kLHintsTop | kLHintsExpandX));


Interestingly, making the TGFileBrowser into it’s own tab gets rid of this problem (see code below). But I prefer to implement it in a TGCompositeFrame so I have the ability to resize it and include more widgets in the same tab.


TCanvas* canvas = new TCanvas();

TGFileBrowser* browser = gEve->GetBrowser()->MakeFileBrowser();

TH1D* h1=new TH1D(“h1”,“h1”,10,0,10);


Hi Chris,

There is indeed a protection missing in TGFileBrowser (I will commit a fix soon), but you should initialize the pointer to TBrowser to 0 anyway (or pass a pointer to an existing TBrowser), otherwise the behavior will be unpredictable and it will continue to crash…

Cheers, Bertrand.

Thanks for the reply Bertrand. I will use my workaround until the fix has been implemented.


You’re very welcome. And FYI, the protection has been committed in the master and in the v5-34-00-patches branch.

Cheers, Bertrand.