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>

Hi,

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 (http://root.cern.ch/root/roottalk/roottalk04/3056.html), 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?

Thanks,
Yuri.
---------------------------

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

1. take novice example N01

2. replace exampleN01.cc by:

#include "TROOT.h"

int main()
{

  gROOT->Reset();
  return 0;
}

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

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

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

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/libc.so.6
#2 0xb3aa978b in ?? () from /lib/i686/libc.so.6
#3 0xb3bcf06d in system () from /lib/i686/libpthread.so.0
#4 0xb572dbfd in TUnixSystem::Exec () from /cern/root/lib/libCore.so
#5 0xb5732feb in TUnixSystem::StackTrace () from /cern/root/lib/libCore.so
#6 0xb5733d8d in TUnixSystem::DispatchSignals ()
   from /cern/root/lib/libCore.so
#7 0xb5733e8d in SigHandler () from /cern/root/lib/libCore.so
#8 0xb572a792 in sighandler () from /cern/root/lib/libCore.so
#9 <signal handler called>
#10 0xb4f88cb8 in G__destroy_upto () from /cern/root/lib/libCint.so
#11 0xb4f895cc in G__scratch_globals_upto () from /cern/root/lib/libCint.so
#12 0xb571c299 in TCint::ResetGlobals () from /cern/root/lib/libCore.so
#13 0xb5687f67 in TROOT::Reset () from /cern/root/lib/libCore.so
#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 ]