Message: How to find out segmentation error in this case? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None How to find out segmentation error in this case? 

Keywords: segmentation error, debug,
Forum: Particles
Date: 16 Dec, 2006
From: long <long>

Hi,everyone. Could we discuss about how to debug our codes, especially for
segmentation error. Because I am a beginner. When I began to write my codes, I met
many problems,especially segmentation errors. I found it is hard for a freshman
to find out what happened? So I think this discussion will help all beginers like me.
    Here is my concrete case, when I use geant4info particle, no error occured. 
But when I use electron, segmentation error will happen. Then if I remove some codes on Visualization,
the error will disappear. By using GDB, I found the errors only come up at the end of main(), I mean, after delete
runManager,visManger... So I guess maybe the application try to free
some memory which had been freed or which don't belong to it. But where is the 
problem? So could anybody give some general ideas on how to deal with these kind things?
  Thank you very much!

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

1 None: Re: How to find out segmentation error in this case?   (Vladimir IVANTCHENKO - 18 Dec, 2006)
(_ None: Re: How to find out segmentation error in this case?   (long - 18 Dec, 2006)
(_ None: Re: How to find out segmentation error in this case?   (Vladimir IVANTCHENKO - 19 Dec, 2006)
 Add Message Add Message
to: "How to find out segmentation error in this case?"

 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 ]