Message: GEANT4 and ROOT - segmentation violation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question GEANT4 and ROOT - segmentation violation 

Forum: Installation and Configuration
Date: 22 Apr, 2009
From: Yuri <Yuri>


I'm using Geant4 with root. The program compiles without problems, but it gives run-time error "segmentation violation". The problem is probably connected with compiling options. I found description of similar problem in RootTalk (, but from what is written there I couldn't understand what exactly I should do to solve the problem. The most strange thing is that everything works well on another computer. The only difference between that computer and mine is that mine is Athlon, the other is Pentium. Everything else seems to be the same (linux distribution is i586 on both). I even tried to compile everything (including ROOT and GEANT4 distributions) on another computer and run in on mine - the same problem. "Pure" Geant4 and ROOT applications work well, only the combination doesn't work. Probably it's root-related problem, bt I'm posting it here since I'm using GEANT4 as the "main Makefile". As I said, root itself (without GEANT4) seems to give no problems.

Does anyone know the solution?


The simplest way to reproduce my problem is (except that it appears only on my PC):

1. take novice example N01

2. replace by:

#include "TROOT.h"

int main()

  return 0;

3. Add to the end of GNUmakefile
(like in examples/extended/parallel/MPI/exMPI02):

  CPPFLAGS += -I$(shell $(ROOTSYS)/bin/root-config --incdir)
  CPPFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags)
  LDLIBS += $(shell $(ROOTSYS)/bin/root-config --libs)

ifeq ($(G4SYSTEM),Linux-g++)
  LDLIBS += -Wl,-rpath,$(shell $(ROOTSYS)/bin/root-config --libdir)

The output of the program is:
 *** Break *** segmentation violation
Attaching to program: /proc/15824/exe, process 15824
[Thread debugging using libthread_db enabled]
[New Thread 0xb39426d0 (LWP 15824)]
0xffffe424 in __kernel_vsyscall ()
Missing debug package(s), you should install: freetype2-debug gcc-debug glibc-debug lesstif-debug libdrm-debug libice-debug libsm-debug libx11-debug libxau-debug libxaw-debug libxcb-debug libxdamage-debug libxdmcp-debug libxext-debug libxfixes-debug libxmu-debug libxp-debug libxpm-debug libxt-debug libxxf86vm-debug mesa-debug nss_mdns-debug zlib-debug
#1 0xb3b08593 in waitpid () from /lib/i686/
#2 0xb3aa978b in ?? () from /lib/i686/
#3 0xb3bcf06d in system () from /lib/i686/
#4 0xb572dbfd in TUnixSystem::Exec () from /cern/root/lib/
#5 0xb5732feb in TUnixSystem::StackTrace () from /cern/root/lib/
#6 0xb5733d8d in TUnixSystem::DispatchSignals ()
   from /cern/root/lib/
#7 0xb5733e8d in SigHandler () from /cern/root/lib/
#8 0xb572a792 in sighandler () from /cern/root/lib/
#9 <signal handler called>
#10 0xb4f88cb8 in G__destroy_upto () from /cern/root/lib/
#11 0xb4f895cc in G__scratch_globals_upto () from /cern/root/lib/
#12 0xb571c299 in TCint::ResetGlobals () from /cern/root/lib/
#13 0xb5687f67 in TROOT::Reset () from /cern/root/lib/
#14 0x0804915b in main ()
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/15824/exe, process 15824

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: GEANT4 and ROOT - segmentation violation   (Ben Morgan - 27 Apr, 2009)
(_ None: Re: GEANT4 and ROOT - segmentation violation   (Yuri - 08 May, 2009)
 Add Message Add Message
to: "GEANT4 and ROOT - segmentation violation"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]