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 #71816 is a reply to message #71815] Sun, 25 July 2010 10:20 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
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.
[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: Fri Oct 10 22:39:40 PDT 2025

Total time taken to generate the page: 0.71784 seconds