Segmentation violation - Garfield example

Dear all ;
I was wondering if I could get some help in finding out why the errors below are occuring.
I am trying to execute this example « garfieldpp.web.cern.ch/garfieldp … nergypion/ » But it gives me this error.
Could really use some advice for this problem. Thanks.
Mounia

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fd76b895a0c in __libc_waitpid (pid=15087, stat_loc=stat_loc
entry=0x7ffdf8e47b00, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1 0x00007fd76b81b232 in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2 0x00007fd76db39703 in TUnixSystem::StackTrace() () from /home/mounia/Documents/root/lib/libCore.so
#3 0x00007fd76db3b40c in TUnixSystem::DispatchSignals(ESignals) () from /home/mounia/Documents/root/lib/libCore.so
#4 <signal handler called>
#5 0x00007fd76cb9f684 in TPad::WaitPrimitive(char const*, char const*) () from /home/mounia/Documents/root/lib/libGpad.so
#6 0x00000000004e7a4e in Garfield::ViewDrift::Plot3d(bool) ()
#7 0x000000000044bbf3 in main ()
===========================================================

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
[root.cern.ch/bugs](http://root.cern.ch/bugs). Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00007fd76cb9f684 in TPad::WaitPrimitive(char const*, char const*) () from /home/mounia/Documents/root/lib/libGpad.so
#6 0x00000000004e7a4e in Garfield::ViewDrift::Plot3d(bool) ()
#7 0x000000000044bbf3 in main ()
===========================================================

Hi,

the stack does not say much. Did you try to find help on Garfield resources?

Danilo

Thank Danilo for your reply;
I have tried my best to understand the problem. But reading through the internet did not help.
I receive the following errors when I try to plot the electric field inside a drift chamber.

The only element of this trace back sounding familiar to me is “TPad::WaitPrimitive”…
It seems your script does some specific graphics interaction.
Can you post here the example macro you are running ? (if not to big)

I thought that this is what one includes in the makefile. My makefile is the following

CXX = g++
OBJDIR = $(GARFIELD_HOME)/Object
SRCDIR = $(GARFIELD_HOME)/Source
INCDIR = $(GARFIELD_HOME)/Include
HEEDDIR = $(GARFIELD_HOME)/Heed
LIBDIR = $(GARFIELD_HOME)/Library

# Compiler flags
CFLAGS = `root-config --cflags` -I$(INCDIR) -I$(HEEDDIR) -c

# Debug flags
# CFLAGS += -g

LDFLAGS = -L$(LIBDIR) -lGarfield 
LDFLAGS += -L/usr/local/lib -lgfortran
LDFLAGS += `root-config --glibs` -lGeom

TARGET = main_example

all: $(TARGET).cpp 
	$(CXX) $(CFLAGS) $(TARGET).cpp
	$(CXX) $(TARGET).o $(LDFLAGS) -o $(TARGET)

A working version of the code (tested with Garfield++ SVN revision 304) can be downloaded along with the Magboltz gas file and an example makefile (garfieldpp.web.cern.ch/garfieldp … nergypion/).

Thanks for your help,

Thanks.
As it seems to be a garfield problem.
Have you tried the Garfield support ? here: garfieldpp.web.cern.ch/garfieldpp/support/

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.