[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segmentation fault with CDF routines under Linux
- Subject: Re: Segmentation fault with CDF routines under Linux
- From: Med Bennett <mbennett(at)indra.com>
- Date: Fri, 10 Nov 2000 16:31:13 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Posted via Supernews, http://www.supernews.com
- References: <8uhv56$qsv$1@nnrp1.deja.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:22124
I've not used CDF, but the only thing I can think of is that perhaps your
variable 'file' is a string array of length 1 rather than just a string.
What does it say if you do a 'help,file' after
file=findfile('ac_*_swe_'+year_beg+month_beg+day_beg+'*.cdf')? This has
tripped me up numerous times in other situations. You should probably also
use a variable name other than 'file', as that is a keyword to the open
procedure.
riglerej@my-deja.com wrote:
> Using both 5.3, and 5.4, I consistently have problems with seg-faults
> when trying to run various CDF routines under Linux. I'm fairly new to
> using IDL to read CDFs, but I'm not trying to do anything strange. In
> fact, I can't even get cdf_open to work.
>
> Specifically, I have a problem when my argument to cdf_open is a string
> provided by the findfile routine. If I type in my own string,
> everything works great, but if it comes from findfile, I get a
> seg-fault. The exerpt below is copied exactly from my session, an
> should give a very clear idea of what is happening...
>
> IDL Version 5.4 (linux x86). (c) 2000, Research Systems, Inc.
> Installation number: 100.
> Licensed for use by: moiraine
>
> IDL> year_beg='2000'
> IDL> month_beg='08'
> IDL> day_beg='01'
> IDL> help
> % At $MAIN$
> DAY_BEG STRING = '01'
> MONTH_BEG STRING = '08'
> YEAR_BEG STRING = '2000'
> Compiled Procedures:
> $MAIN$
>
> Compiled Functions:
>
> IDL> file=findfile('ac_*_swe_'+year_beg+month_beg+day_beg+'*.cdf')
> IDL> print,file
> ac_k0_swe_20000801_v01.cdf
> IDL> id=cdf_open(file)
> % Loaded DLM: CDF.
> Segmentation fault
>
> [jrigler@moiraine] [15:55:03]
> 1016 <~/research/LPF/data/cdf/ace/swe/2000> idl
> IDL Version 5.4 (linux x86). (c) 2000, Research Systems, Inc.
> Installation number: 100.
> Licensed for use by: moiraine
>
> IDL> file='ac_k0_swe_20000801_v01.cdf'
> IDL> id=cdf_open(file)
> % Loaded DLM: CDF.
> IDL>
>
> Can anyone else recreate this on Linux, or with versions other than 5.3
> and 5.4? I tried this with several different cdf files, so I don't
> think it is a problem with the file format. Any other ideas?
>
> -Josh
>
> P.S. While I'd love to move to HDF, that is not an option, so it might
> be wisest not to make that suggestion.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.