Illegal pointer to class object gClient

Hi

I am using root 5.34 on a linux machine I connect to with ssh -Y.
When I want to run one of my macros with “root macro.C” or after starting root with “.x macro.C” I get the error: Error: illegal pointer to class object gClient 0x0 1097 macro.C:850:
In this line I call

void macro() { // Popup the GUI... new MyMainFrame(gClient->GetRoot(),1024,724); }.

Does it have something to do with the linux client I use (NoMachine connecting to SLP6)?

Regards,
delos

Hi delos,

Which exact version of ROOT? How (and where) was it installed?
Can you open any other window from this ssh session? (e.g. a text editor, firefox, …)

Cheers, Bertrand.

Hi bellenot

root was installed by our IT-team. There are two versions available that I have to load as modules.
If I do “module avail” I get root-5.30.01 and root-5.34. Both version work unless I don’t try to popup the GUI.
It is scientific linux SLP6 and I can open apps like emacs and firefox.

cheers,
delos

PS: just tried new TBrowser which usually open a window but nothing happens

Somewhere in the beginning of your “macro”, try to add:
gSystem->Load(“libGui”); // provides “gClient”

What do you mean exactly by “to load as modules”?

Could you be more precise? 5.34. is not enough (it goes from 5.34.01 to 5.34.37…)
And could you try to start a ROOT browser from a ROOT session?

Cheers, Bertrand.

Hi

I was told if I want to use root I would have to enter “module load root”. Then root is available in my path. I can basically choose the root version. The ones we have are 5.34.19, 5.34.26 and 5.34.34. I tried all of them.
And no, I cannot start a browser.
Our support are actually not very helpful with root. The accept us using it, but propagate stuff like matlab.

Thanks,
delos

“Start a ROOT browser” means executing:
root [0] new TBrowser();
Do you get a new “ROOT Object Browser” window displayed?

Hi Pepe

I tried to open the browser (see above) but nothing happens. Seems to be a fundamental problem with our installation.

Regards,
delos

Maybe it’s the “DISPLAY” setting which is wrong.
From inside of the terminal window in which you start “root”, try to run “xterm” and see if you get it displayed.

Also, post here the output of:
root-config --features

Hi Pepe

The command “xterm” opens a new terminal window. From root-config --features I get the following output:

thanks,
delos

So, everything seems to be fine …
Try to login to your machine using:
ssh -X -Y
If you get no error then I don’t understand why “new TBrowser();” fails.
Unless you have somewhere a “.rootrc” or “rootlogon.C” which switches ROOT into “batch mode” (or maybe you have an alias “root -b”).

Hi Pepe

Just tried but I get the same illegal pointer error.
I guess I have to bother my IT-colleagues a bit more because on my local machine everything works fine.
I’ll let you know as soon as they found the problem.

Regards,
delos

Dear dolleagues

I added the following to my .bashrc to solve the problem:

source /opt/psi/config/profile.bash module use unstable module load gcc/4.8.3 module load root/5.34.34

Now I can run my macro and open a TBrowser window.

Maybe it helps someone else, too.

Cheers,
delos