Topic: Segmentation fault

After a program update to SF3.5 following message stop the program at the start:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
    Backtrace is unavailable.  Please use
    the Simply Fortran debugger for similar
    functionality

What is the reason? Wat to do?
(also the same happens using SF2.41)

Regards, Klaus

Re: Segmentation fault

Klaus,

There were some runtime library changes.  I would suggest at least cleaning and building your project again in case some internal structure changed.

You might also consider using "Enable Runtime Diagnostics" to see if the runtime library can catch any array bounds violations in your own code.

Finally, you can also do what the error suggests and run your code using the debugger.  It should stop exactly where the crash occurs.  You may have to examine the stack in the Debug Panel in case the error is occurring somewhere in the Fortran runtime library.

Jeff Armstrong
Approximatrix, LLC

Re: Segmentation fault

Thanks Jeff,
A lot of lib's and module files are created by an old version of GNU Fortran. I have to rebuild a lot
Regards, Klaus

Re: Segmentation fault

Klaus,

In that case, consider starting with just enabling runtime diagnostics to see if your Fortran code is the problem.  Also, try running under the debugger too.  Perhaps it is a simple problem that doesn't require your rebuilding your entire stack.

Jeff Armstrong
Approximatrix, LLC

Re: Segmentation fault

Jeff,
It was a very simple problem caused by the history of a lot of old fortran-files: An old return from a subroutine contained still a *99 instead of a paramater) I am a bit ashamed. Klaus

Re: Segmentation fault

Klaus,

No reason to be ashamed!  We're all bitten by legacy code, whether it's our own or someone else's, at some time or another.  Glad you resolved the problem!

Jeff Armstrong
Approximatrix, LLC