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

Home » Public Forums » archive » Re: IDL 8.0 questions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL 8.0 questions [message #71815 is a reply to message #71814] Sun, 25 July 2010 11:15 Go to previous messageGo to previous message
Mike Potter is currently offline  Mike Potter
Messages: 19
Registered: August 2008
Junior Member
On Jul 25, 1:20 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> I just did some tests, and I can confirm that this is a bug, it is
> completely reproducible, and it is not limited to Windows. I tried on
> Vista 32 with similar results. In Linux 64, besides the problem as
> reported (the string contents getting changed), IDL crashes. Same on
> command line and Workbench.
>
> This is what I used:
>
> pro test_foreach
> compile_opt IDL2
>
> file_names=(file_search('*.fits'))[0:1]
>
> for i=0,n_elements(file_names)-1 do begin
>   qfile = file_names[i]
>   help,qfile,i
>   qim = readfits( qfile )
>   help,qfile
> endfor
>
> foreach qfile, file_names,i do begin
>   print,i
>   qim = readfits( qfile )
> endforeach
>
> print,file_names
> end
>
> Then it crashes on the first call to readfits() in the foreach loop:
>
> IDL> test_foreach
> QFILE           STRING    = 'dec18i0001.fits'
> I               LONG      =            0
> % READFITS: Now reading 256 by 256 array
> QFILE           STRING    = 'dec18i0001.fits'
> QFILE           STRING    = 'dec18i0002.fits'
> I               LONG      =            1
> % READFITS: Now reading 256 by 256 array
> QFILE           STRING    = 'dec18i0002.fits'
>            0
> % READFITS:  ERROR - Unable to locate file ts
> *** glibc detected *** /usr/local/itt/idl/idl80/bin/bin.linux.x86_64/
> idl: double free or corruption (fasttop): 0x0000000001ff7a80 ***
>
> Even more strange, if I change the line before that to
>
> print,i,' ',qfile
>
> All goes as it should:
>
> IDL> test_foreach
> QFILE           STRING    = 'dec18i0001.fits'
> I               LONG      =            0
> % READFITS: Now reading 256 by 256 array
> QFILE           STRING    = 'dec18i0001.fits'
> QFILE           STRING    = 'dec18i0002.fits'
> I               LONG      =            1
> % READFITS: Now reading 256 by 256 array
> QFILE           STRING    = 'dec18i0002.fits'
>            0 dec18i0001.fits
> % READFITS: Now reading 256 by 256 array
>            1 dec18i0002.fits
> % READFITS: Now reading 256 by 256 array
> dec18i0001.fits dec18i0002.fits
>
> In the few months I had been using the test releases for IDL 8, I
> never saw something like this. I tested on Tech Preview 3, and found
> it also crashes, though in a different way.
>
> I am going to look into it in more detail, to see if I can tell where
> the value of qfile gets changed. And I am reporting this to ITTVIS.


Paulo:

Thanks for the confirmation. You know, I've been trying the things
you suggested and in the past hour or so have been unable to get it to
misbehave! That is, it's working fine right now. I have no clue as
to why. But note that in the line "% READFITS: ERROR - Unable to
locate file ts" note that, like in my case, the two characters
remaining are the last two in the file name. My files are ".fit" so I
was getting "it" as the remaining characters after going to
readfits().

Mike Potter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Writing in IDL at the same line in the screen
Next Topic: Extract pixel values from HDF-EOS file

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

Current Time: Sat Oct 11 06:53:01 PDT 2025

Total time taken to generate the page: 3.78266 seconds