Re: Segmentation Faults
On Mon, 14 Aug 2000, Kayhlan wrote:
> Hello Folks,
>
> I'm coding a game in Euphoria under the Linux platform. After three
> years + of programming, I have approximately 1.5 meg of game code (this
> is a text-based game, not a graphical one) and I've recently been
> getting "segmentation fault" errors. I know that Euphoria does not
> generate an ex.err file because of the segmentation fault, but I need to
> know what sorts of things cause these segmentation faults because I
> cannot duplicate the error at will, it seems to randomly occur. I use
> very few calls to the C language, mostly it is just manipulation of
> sequences.
Hi Kayhlan:
>From my own experience, segmentation faults are generally caused by an
attempt to reference a physical location in memory that Euphoria does not "own".
This can happen thu pokes (or peeks) into memory that Euphoria has not
allocated. Sometimes it happens when calling a c routine and passing an
invalid pointer. That causes the c routine to muck about where it doesn't
belong.
These things can be hard to track down, the only way I know is to trace into
the suspected area, and step thru the code. You'll find the call that is
causing the problem. Then it's just a matter of trying to figure out which
parameter of the call is incorrect.
Regards,
Irv
|
Not Categorized, Please Help
|
|