TEveManager::Create() instantly segfaults

Hello all,

I’m attempting to venture into the world of eve, starting by trying to execute the sample scripts in the tutorial directories. However, it doesn’t work. It appears I get a segmentation fault by attempting to execute TEveManager::Create() (which the tutorial scripts call early on). A couple of session captures follow. I am using a freshly built version 5.22 below, though the same thing happens using a stock install from Debian’s binary packages (“testing” distribution).

I don’t know how to get it to display the backtrace for this build. It’s a local installation (from my home directory).

Cheers,
Matthew Lockner

  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.22/00  17 December 2008   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.22/00 (trunk@26997, De 21 2009, 14:29:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .x geom_alice_tpc.C 

 *** Break *** segmentation violation
sh: /etc/root/gdb-backtrace.sh: No such file or directory
Root > Function geom_alice_tpc() busy flag cleared
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.22/00  17 December 2008   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.22/00 (trunk@26997, De 21 2009, 14:29:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TEveManager::Create();

 *** Break *** segmentation violation
sh: /etc/root/gdb-backtrace.sh: No such file or directory
Root > 

This seems to get farther if I use 5.26, but still no dice:

[mlockner@norland eve]$ root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.26/00  14 December 2009   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.26/00 (trunk@31878, De 21 2009, 15:35:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.17.00, Dec 21, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .x geom_alice_tpc.C 
Exception TEveException: TEveManager::Create window system not initialized.

Hi,

This is exception is thrown under the following conditions:
if (gROOT->IsBatch() || gClient == 0 || gClient->IsZombie())
{
throw eh + “window system not initialized.”;
}
so it seems X11 interface can not initialize properly.

What happens if you just type ‘new TBrowser’ on the root prompt?
Are other X-applications starting up correctly from the same shell?

Best,
Matevz

Hmm. Calling “new TBrowser()” looks like it works but does not produce a TBrowser window:

root [0] new TBrowser()
(class TBrowser*)0xafb190

I can start X apps from that same shell though. For example,

root [0] gSystem->Exec("xclock")

will show me a clock as expected. I must have screwed up some build option somewhere. I confess it’s been more challenging than I’d expected to get fresh builds to work at all.

Hi,

This is indeed strange. Can you try executing the individual elements of the condition from my previous post to see which one fails.

Is it possible that you have some rootrc or rootlogon macro lurking somewhere that switches to batch mode?

Good luck,
Matevz

[quote=“matevz”]Hi,

This is indeed strange. Can you try executing the individual elements of the condition from my previous post to see which one fails.

Is it possible that you have some rootrc or rootlogon macro lurking somewhere that switches to batch mode?

Good luck,
Matevz[/quote]

It is not in batch mode, as expected, but gClient is not defined:

root [0] gROOT->IsBatch()
(const Bool_t)0
root [1] gClient == 0
Error: Symbol gClient is not defined in current scope  (tmpfile):1:
(const int)0
*** Interpreter error recovered ***

Also, this is a bit of a long shot and likely unrelated, but the nearest thing I get to a build error is this, when I run make install:

Installing config files in /etc/root
mkdir: cannot create directory `/etc/root': Permission denied
cp: target `/etc/root' is not a directory

I should be able to install into a local directory as an unprivileged user, right?

For some reason the initialization of TGClient fails. For X that would be either TGX11 or TGX11TTF if you have X11.UseXft set. What does

gEnv->GetValue(“X11.UseXft”,999)

say? It could fail if you have no xft library. If this is enabled, try setting this to 0 in your rootrc.

Does root-config --features list xft?

[quote=“matevz”]For some reason the initialization of TGClient fails. For X that would be either TGX11 or TGX11TTF if you have X11.UseXft set. What does

gEnv->GetValue(“X11.UseXft”,999)

say? It could fail if you have no xft library. If this is enabled, try setting this to 0 in your rootrc.[/quote]

I get 999:

root [0] gEnv->GetValue("X11.UseXft", 999)
(Int_t)999

To my knowledge I do not have a rootrc. Where is that found, or where are new ones supposed to go?

It looks like it:

$ root-config --features
asimage astiff builtin_afterimage builtin_ftgl builtin_freetype builtin_glew builtin_pcre builtin_zlib cint5 cintex editline exceptions genvector ldap memstat opengl reflex shadowpw shared ssl tmva xft xml xrootd thread

rootrc is taken from .rootrc, $HOME/.rootrc and $ROOTSYS/etc/system.rootrc (or /etc/root/system.rootrc for --prefix build) in reverse order so that you can override just some vars in home/current dir.

The fact that X11.UseXft is undefined (returns 999, the argument) suggests that no rootrc file is found at all. This could explain your trouble as this file defines many variables that are needed by root.

What build (prefix or normal) and version are you using now? What is the contents of $ROOTSYS/config.status?

Maybe also cross check the relevant env vars.

If all else fails try copying etc/system.rootrc from build directory to ~/.rootrc.

This is:

I used ./configure --prefix=$HOME/local --disable-mathmore to configure (mathmore fails to build because our gsl install seems to be such that gsl-config doesn’t give reliable output), and then just make/make install from there. The install (see prior post) tries but fails to install stuff into /etc since I’m building as just a normal user.

I tried copying $HOME/local/root-x86_64/etc/system.rootrc to $HOME/.rootrc, and now gEnv->Print() gives me a few nice screenfuls of settings (before doing that, gEnv->Print() showed nothing).

I do not have any $ROOTSYS/config.status file. $HOME/src/root has one, but all it says is:

OK … this will not work … you do need the etc directory. It also contains the plugin macros via which several parts of root get pulled in.

So, either install as root (uid 0) or use the normal (non-prefix) build.

[quote=“matevz”]OK … this will not work … you do need the etc directory. It also contains the plugin macros via which several parts of root get pulled in.

So, either install as root (uid 0) or use the normal (non-prefix) build.[/quote]

Should I notify someone of the make install problem? It certainly seemed to me just reading the build instructions that a complete self-contained local install was possible.

Thanks,
M. Lockner

Never mind, the docs do indeed make a small note of this issue:

[quote=“mlockner”][quote=“matevz”]OK … this will not work … you do need the etc directory. It also contains the plugin macros via which several parts of root get pulled in.

So, either install as root (uid 0) or use the normal (non-prefix) build.[/quote]

Should I notify someone of the make install problem? It certainly seemed to me just reading the build instructions that a complete self-contained local install was possible.

Thanks,
M. Lockner[/quote]

OK … sorry it took so long to trace this down.

Good luck,
Matevz

Everything is working now (EVE tutorial examples included), changing the /etc location did the trick.

Thanks,
Matthew Lockner

Hello Matevz,

Is the format of this alice.root file used in the demos documented somewhere?

It kind of looks like a bunch of GEANT volume names in the nodes, is that correct?

Hi Matthew,

alice.root is the standard root TGeo geometry used by ALICE. It is really a standard streaming of TGeoManager which contains the hierarchy of nodes and lists of volumes, shapes, materials, media, …

Compared to other geometry packages TGeo also provides navigation (point location and boundary proximity queries). This allows ALICE to use geant3, geant4 and fluka with the same geometry.

And yes, the volume names look a lot like geant3 :slight_smile:

Then one can build a specially crafted hierarchy of mother volumes to outline the detector geometry for event-display. This can be done from the TGeo geometry by removing all un-needed nodes from the hierarchy (select, hit ‘Delete’ key), exporting the TEveGeo node you want to have as the top node to CINT (via context menu) and calling: evenode->SaveExtract(file, name). This saves a hierarchy of TEveGeoShapes that represent the geometry elements that are existing in the eve list-tree view below the selected node.

This is used in alice_vsd.C demo … see there also how this extract is imported.

For an overview of EVE see the first paper on this page:
root.cern.ch/root/htmldoc/GRAF3D_EVE_Index.html

Cheers,
Matevz

Hello Matevz,

I’m still very green on the ROOT geometry classes. I think I have extracted a decent hierarchy for the detector I want to draw, but it’s a little bit of a mess when drawn (lots of stuff in the way that doesn’t need to be shown for an event visualization). I think I can see a way to clean things up a bit though.

Suppose I have an easily specified criteria where I can match a volume name and specify its visibility or transparency accordingly. Is there a reasonable way to traverse the hierarchy of volumes via a macro, and run some block of code for each node visited?

Also - I generated my hierarchy using g2root. Should TEveManager be able to load those directly (with a call to GetGeometry)? I trivially modified the geom_alice_its.C example to do so, but it segfaulted. I can attach my geom file if you’re willing to field this one, with the caution that it’s large (~200K or so).

Thanks,
Matthew Lockner

To import the file converted by g2root simply do the following in a ROOT session
root > TGeoManager::Import(“mygeometry.root”);
root > TBrowser b

and look at the geometry tree, you can view it with GL directly, and of course with eve too.

for info, Matevz will only be back next week.

Rene

Thanks - I managed to resolve the issues.