comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Segmentation Fault
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Segmentation Fault [message #10754] Tue, 20 January 1998 00:00 Go to next message
enkpong is currently offline  enkpong
Messages: 14
Registered: April 1997
Junior Member
Hi,

I have a couple of questions about calling an external program
in PV-Wave (v5.0). I don't know whether these questions have been
answered before.

I have some application programs that were written in standard C.
When I used LINKNLOAD to call these programs with a wrapper
routine, I got SEGMENTATION FAULT occassionally. The result is --
the session crashed and returned to the operating system. Does
anyone encounter this kind of error before ?? Is this error
occurred in calling external programs only ?? Is there any way to
avoid it ??

I haven't tried doing the same thing in IDL, but I would be very
happy to listen to IDL's folks experience. Thank you !!


Regards,
KP.

--
Koon-pong Wong Email : enkpong@en.polyu.edu.hk
Department of Electronic Engineering
The Hong Kong Polytechnic University Phone : (+852) 2766 6201
Hung Hom, Kowloon FAX : (+852) 2362 8439
Hong Kong Office: DE503d
Re: segmentation fault [message #18205 is a reply to message #10754] Sun, 12 December 1999 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
gross@chuma.cas.usf.edu wrote:

> Hello:
>
> I'm looking for some expert help....well...any kind of help !
>
> I am running a procedure that I have written in IDL using the solaris
> x86 operating system...I continually make modifications to my method
> of analysis, so I frequently break out of the program to "RETALL" and
> begin again....
>
> Unfortunately, after typing "RETALL", I now get the following message
> from IDL..
> temporary variables are still checked out-cleaning up...
>
> and then the OS gives a segmentation fault.

We also have such a problem.

Since idl5.2 using ncdf_open and ncdf_close the same failure occure with
all of our IBM aix systems.

If I use ncdf_open /ncdf_close and a device or window command I got the
segmentation fault core dump error.

Not always at the same "ii" but it never reaches 2000.

PRO ncdf_error
; one of the following three commands gives a segmentation fault
widget_control,default_font='-adobe-helvetica-medium-r-norma l--12-*-*-*-*-60-*-*'

device,decomposed=0
window,0,xsize=100,ysize=100,color=256
FOR ii=0,2000 DO BEGIN
PRINT,ii
file_name = 'ncdf_error.nc'
cdfid = NCDF_OPEN(file_name,/NOWRITE) ; OPEN the file
NCDF_CLOSE,cdfid
ENDFOR
END


WinNT or Linux did not have this problem!

This failure is known since summer of this year by RSI, but it isn't
resolved. It has a high priority I was told.

Somone of us tries using the netCDF 3.4 library instead of the build in
2.4 by call_external.
The same result - segmentation fault.

I don't know myself if it's a problem by the IBM C-Compiler or how IDL
embedds external linked programs for
aix.



R.Bauer
Re: segmentation fault [message #18214 is a reply to message #10754] Fri, 10 December 1999 00:00 Go to previous message
Marc Schellens is currently offline  Marc Schellens
Messages: 14
Registered: November 1999
Junior Member
> Can you find out what he did?

I talked to him, but we could not find out and came to
the conclusion, that only thing 'changed' was rebooting.
I am sure this is very helpful.
;-) marc
Re: segmentation fault [message #18262 is a reply to message #10754] Mon, 06 December 1999 00:00 Go to previous message
Bruce Bowler is currently offline  Bruce Bowler
Messages: 128
Registered: September 1998
Senior Member
Marc Schellens wrote:
>

> Our system administrator changed something, but I do not know what
> since he did it for other purposes.

Can you find out what he did?
Re: segmentation fault [message #18270 is a reply to message #10754] Sun, 05 December 1999 00:00 Go to previous message
Marc Schellens is currently offline  Marc Schellens
Messages: 14
Registered: November 1999
Junior Member
gross@chuma.cas.usf.edu wrote:
>
> Hello:
>
> I'm looking for some expert help....well...any kind of help !
>
> I am running a procedure that I have written in IDL using the solaris
> x86 operating system...I continually make modifications to my method
> of analysis, so I frequently break out of the program to "RETALL" and
> begin again....
>
> Unfortunately, after typing "RETALL", I now get the following message
> from IDL..
> temporary variables are still checked out-cleaning up...
>
> and then the OS gives a segmentation fault.
>
> I know I'm not running out of swap space, and a call to "TOP" shows
> that I'm taking about 20 mb with my IDL application ( have 128 mb in
> system) and I've checked (and increased) the stack size and file
> descriptor limits for the OS....
>
> Can anyone give me any hints on what I should look for next ??
>
> ( Dave Fanning...I know you're lurking out there somewhere !)
>
> Thanks,
>
> bill gross
We running here solaris on SPARC, but lately some applications crashed
also with segmentation fault. This happened when user opens too many
windows. So I thought it was a problem with X. No everything runs fine
again and the user can open much more windows than before :-)
Our system administrator changed something, but I do not know what
since he did it for other purposes.
Message: IDL under solaris might crash when the system setup is not
appropriate/incosistent/wrong.
So perhaps you should look for your problem in this direction.
:-) marc
Re: segmentation fault [message #18273 is a reply to message #10754] Sat, 04 December 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Bill Gross (gross@chuma.cas.usf.edu) writes:

> I'm looking for some expert help....well...any kind of help !

Oh, well, if any kind of help will do, I can help. :-)

> I am running a procedure that I have written in IDL using the solaris
> x86 operating system...I continually make modifications to my method
> of analysis, so I frequently break out of the program to "RETALL" and
> begin again....
>
> Unfortunately, after typing "RETALL", I now get the following message
> from IDL..
> temporary variables are still checked out-cleaning up...
>
> and then the OS gives a segmentation fault.
>
> I know I'm not running out of swap space, and a call to "TOP" shows
> that I'm taking about 20 mb with my IDL application ( have 128 mb in
> system) and I've checked (and increased) the stack size and file
> descriptor limits for the OS....
>
> Can anyone give me any hints on what I should look for next ??

Uh, well, I would look for a good book on program
interface design. :-)

When your program calls a procedure or function, and that
procedure or function needs some variables, it gets them.
If you kill the program while you are two or three levels
deep, you will leave those temporary variables dangling when
you RETurn ALL the way back to the main level. So IDL tries
to clean up after you. Hence, the message you get.

I often (too often!) see the message when I've crashed
a program in an event handler, for example, since the
event handler is called from within XMANAGER.

I'm not sure why you are getting a segmentation fault,
however. You are probably going to have to ask the
good folks at RSI about that. Normally, IDL just
carries on after returning as if nothing had happened.

I would reconsider your program design, however, to allow
better interactivity than just killing the darn thing
and starting over. That seems just a tad retro to me.
Kind of like the way I wrote FORTRAN programs in the
late 1970's. How about a pop-up dialog that asked if
you want to continue program execution at various stages
of the analysis. Something you could turn off, for example,
once you got the process figured out. Or maybe a slider
attached to one of the parameters so you could interactively
change the parameter value instead of having to start
over.

> ( Dave Fanning...I know you're lurking out there somewhere !)

I've never lurked on this newsgroup a day in my life. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: LMFIT
Next Topic: Re: How to select best from a long list?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 09:14:24 PDT 2025

Total time taken to generate the page: 1.60794 seconds