Problem with TBrowser

Hi,

I’m trying to create a new TBrowser with a specific height, width, and position. The following, which creates a TBrowser with specific dimensions, works:

but the following, which should create a TBrowser with specific dimensions at a specific location, does not:

as it should, per this page: TBrowser documentation

Instead, I get the following error:

Error in <TPluginHandler::ExecPlugin>: nargs (7) not consistent with expected number of arguments ([0-5])
libGL error: failed to load driver: swrast

 You are using the old ROOT browser! A new version is available. To use it:
 Select the "New Browser" entry from the "File" menu in the browser, or change
 "Browser.Name:" from "TRootBrowserLite" to "TRootBrowser" in system.rootrc

The “old” browser then pops up with the correct dimensions and location, but which has reduced functionality.

The TBrowser.h header file in $ROOTSYS/include/ has a definition for the latter syntax that has extra arguments for the position, so it should work, but it does not, and seems to fail because no function is defined for the latter option.

I’m using ROOT 5.34/32 on SLC6.6 via SSH at lxplus@cern.ch, if that helps.

Thanks for any advice in advance!

Hi,

This is now fixed this in git (master and v5-34-00-patches), but in the meanwhile, you can add the following piece of code in $(ROOTSYS)/etc/plugins/TBrowserImp/P010_TRootBrowser.C:

gPluginMgr->AddHandler("TBrowserImp", "TRootBrowser", "TRootBrowser", "Gui", "NewBrowser(TBrowser *, const char *, Int_t, Int_t, UInt_t, UInt_t, Option_t *)");
That should fix the issue

Cheers, Bertrand.

I can’t seem to edit that file. It’s read-only.

Also, the same code without the Option_t * is already present in the folder I’m looking at (not sure if I should be looking at gcc48 or gcc49.

Is there a way to use the fixed version when I start up root from my lxplus home directory? I know that’s not a ROOT question, but maybe you know the answer anyway.

Hi,

Well, in fact I was wrong, and the problem seems more complex than that, I’ll have to debug it. Stay tuned!

Cheers, Bertrand.

Hi,

The problem has been identified and will be fixed soon. In the meanwhile, here is what you can do:

root [0] gROOT->GetPluginManager()->FindHandler("TBrowserImp", "TRootBrowser"); root [1] gROOT->GetPluginManager()->RemoveHandler("TBrowserImp", "TRootBrowser"); root [2] gROOT->GetPluginManager()->AddHandler("TBrowserImp", "TRootBrowser", "TRootBrowser", "Gui", "NewBrowser(TBrowser *, const char *, Int_t, Int_t, UInt_t, UInt_t, Option_t *)"); root [3] new TBrowser("Browser","ROOT Object Browser",100,100,1200,750,0,"") (class TBrowser *) 0x30e95d0 root [4]
Cheers, Bertrand.

Great! It works!

I will add those lines to my .rootlogon.C.

Thanks so much!