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

Home » Public Forums » archive » HDF routines cause coredump
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
HDF routines cause coredump [message #7821] Fri, 10 January 1997 00:00
James Theiler is currently offline  James Theiler
Messages: 2
Registered: October 1995
Junior Member
Hello,
I've been having a devil of a time trying to use IDL's HDF
functions. Any general advice would be appreciated, but the main
purpose of this post is to provide an example of code that causes IDL
to coredump. I am still not sure exactly what is causing the
coredumps, since IDL graciously waited until the code was fairly
extensive to start this egregious behavior, but I may have isolated
the problem to the HDF_SD_SETEXTFILE function.

The following is an example of a small routine that causes IDL to
coredump; I'm pretty sure it's legal code -- it is practically copied
from the IDL Reference Guide (V 4, March '95, 1-422) -- but even if it
weren't, I'd still prefer an error message to a coredump. In this
case, the coredump is caused by an interaction with 'stop', but I
don't know if that's the whole story.

It dumps core on my Sun4, but merely causes an error on the IRIX.
When the 'stop' is not invoked (by not using the '/coredump' keyword
when running this example), it seems to be okay.

========== Here is an example session:

IDL> core_dump_sun
% Compiled module: CORE_DUMP_SUN.
ok
IDL> core_dump_sun,/coredump
% Stop encountered: CORE_DUMP_SUN 12 core_dump_sun.pro
IDL> .con
/n/vendor/bin/idl: 9847 Memory fault - core dumped

=========== and here is the code:

PRO core_dump_sun,coredump=coredump

;; if the '/coredump' keyword is set, then it
;; core dumps on the Sun4 (but not on IRIX)

sd_id = HDF_SD_START('a.hdf',/create)
sds_id = HDF_SD_CREATE(sd_id,'a',[3,5],/float)

HDF_SD_ENDACCESS, sds_id
sds_id = HDF_SD_SELECT(sd_id, 0)

if keyword_set(coredump) then stop
;; here is where the coredump occurs,
;; right after the user types '.con'
;; at the IDL> prompt
HDF_SD_SETEXTFILE, sds_id, 'a.hxt'

;; cleanup (if we ever get here...)
HDF_SD_ENDACCESS, sds_id
HDF_SD_END,sd_id

print,"ok"
END


---------------------------------------------
James Theiler jt@lanl.gov
MS-D436, NIS-2, LANL tel: 505/665-5682
Los Alamos, NM 87545 fax: 505/665-4414
Astrophysics and Radiation Measurements Group
[Message index]
 
Read Message
Previous Topic: idl for linux
Next Topic: Vector Calculation Q

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

Current Time: Thu Oct 09 15:28:09 PDT 2025

Total time taken to generate the page: 0.88207 seconds