FILE_LINES change in 8.4 [message #92723] |
Wed, 17 February 2016 06:44  |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
Folks-
Weird issue I've come across in the past few days. It seems the behavior of FILE_LINES has changed from 8.4 to 8.5.
I've used a line of code like this since pre-7 days with no problems:
nLines = FILE_LINES(f, /COMPRESS)
where f is a basic gzipped file.
Now, this returns zero for me.
Anyone else using FILE_LINES with compressed files?
Here's a concrete example:
IDL> f='LYLOUT_120522_030000_3600.dat.gz'
(File available here: https://goo.gl/ROaE3J)
Under 8.4, I get:
IDL> file_lines(f, /compress)
123806
but under 8.5 I get:
IDL> file_lines(f, /compress)
0
The file really is gzipped:
$ file LYLOUT_120522_030000_3600.dat.gz
LYLOUT_120522_030000_3600.dat.gz: gzip compressed data, was "LYLOUT_120522_030000_3600.dat", from Unix, last modified: Sat Jul 7 08:30:46 2012, max compression
Running on Mac 10.9.5 FWIW.
|
|
|
|
Re: FILE_LINES change in 8.4 [message #92725 is a reply to message #92723] |
Wed, 17 February 2016 08:00   |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
It's a bug. IDL 8.4 works fine:
IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
{ x86_64 linux unix linux 8.5.1 Nov 14 2015 64 64}
<Expression> LONG64 = 0
IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
{ x86_64 linux unix linux 8.4.1 Feb 16 2015 64 64}
<Expression> LONG64 = 123806
regards,
Lajos
It's a regressionOn Wednesday, February 17, 2016 at 3:44:15 PM UTC+1, Phillip Bitzer wrote:
> Folks-
>
> Weird issue I've come across in the past few days. It seems the behavior of FILE_LINES has changed from 8.4 to 8.5.
>
> I've used a line of code like this since pre-7 days with no problems:
>
> nLines = FILE_LINES(f, /COMPRESS)
>
> where f is a basic gzipped file.
>
> Now, this returns zero for me.
>
> Anyone else using FILE_LINES with compressed files?
>
> Here's a concrete example:
>
> IDL> f='LYLOUT_120522_030000_3600.dat.gz'
>
> (File available here: https://goo.gl/ROaE3J)
>
> Under 8.4, I get:
> IDL> file_lines(f, /compress)
> 123806
>
> but under 8.5 I get:
> IDL> file_lines(f, /compress)
> 0
>
> The file really is gzipped:
> $ file LYLOUT_120522_030000_3600.dat.gz
> LYLOUT_120522_030000_3600.dat.gz: gzip compressed data, was "LYLOUT_120522_030000_3600.dat", from Unix, last modified: Sat Jul 7 08:30:46 2012, max compression
>
> Running on Mac 10.9.5 FWIW.
|
|
|
Re: FILE_LINES change in 8.4 [message #92783 is a reply to message #92725] |
Fri, 26 February 2016 14:02   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, February 17, 2016 at 9:00:51 AM UTC-7, fawltyl...@gmail.com wrote:
> It's a bug. IDL 8.4 works fine:
>
> IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
> { x86_64 linux unix linux 8.5.1 Nov 14 2015 64 64}
> <Expression> LONG64 = 0
>
> IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
> { x86_64 linux unix linux 8.4.1 Feb 16 2015 64 64}
> <Expression> LONG64 = 123806
>
> regards,
> Lajos
>
>
> It's a regressionOn Wednesday, February 17, 2016 at 3:44:15 PM UTC+1, Phillip Bitzer wrote:
>> Folks-
>>
>> Weird issue I've come across in the past few days. It seems the behavior of FILE_LINES has changed from 8.4 to 8.5.
>>
>> I've used a line of code like this since pre-7 days with no problems:
>>
>> nLines = FILE_LINES(f, /COMPRESS)
>>
>> where f is a basic gzipped file.
>>
>> Now, this returns zero for me.
>>
>> Anyone else using FILE_LINES with compressed files?
>>
>> Here's a concrete example:
>>
>> IDL> f='LYLOUT_120522_030000_3600.dat.gz'
>>
>> (File available here: https://goo.gl/ROaE3J)
>>
>> Under 8.4, I get:
>> IDL> file_lines(f, /compress)
>> 123806
>>
>> but under 8.5 I get:
>> IDL> file_lines(f, /compress)
>> 0
>>
>> The file really is gzipped:
>> $ file LYLOUT_120522_030000_3600.dat.gz
>> LYLOUT_120522_030000_3600.dat.gz: gzip compressed data, was "LYLOUT_120522_030000_3600.dat", from Unix, last modified: Sat Jul 7 08:30:46 2012, max compression
>>
>> Running on Mac 10.9.5 FWIW.
Yep, I was able to reproduce this. In IDL 8.5 we fixed a different bug to allow GZ files greater than 4 Gb to work properly. That fix inadvertently broke file_lines with gzip compressed files.
It will be fixed in the next IDL version.
Thanks for reporting!
-Chris
|
|
|
Re: FILE_LINES change in 8.4 [message #92788 is a reply to message #92783] |
Mon, 29 February 2016 03:47  |
markb77
Messages: 217 Registered: July 2006
|
Senior Member |
|
|
On Friday, February 26, 2016 at 11:02:34 PM UTC+1, Chris Torrence wrote:
> On Wednesday, February 17, 2016 at 9:00:51 AM UTC-7, fawltyl...@gmail.com wrote:
>> It's a bug. IDL 8.4 works fine:
>>
>> IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
>> { x86_64 linux unix linux 8.5.1 Nov 14 2015 64 64}
>> <Expression> LONG64 = 0
>>
>> IDL> print, !version & help, file_lines('LYLOUT_120522_030000_3600.dat.gz', /compress)
>> { x86_64 linux unix linux 8.4.1 Feb 16 2015 64 64}
>> <Expression> LONG64 = 123806
>>
>> regards,
>> Lajos
>>
>>
>> It's a regressionOn Wednesday, February 17, 2016 at 3:44:15 PM UTC+1, Phillip Bitzer wrote:
>>> Folks-
>>>
>>> Weird issue I've come across in the past few days. It seems the behavior of FILE_LINES has changed from 8.4 to 8.5.
>>>
>>> I've used a line of code like this since pre-7 days with no problems:
>>>
>>> nLines = FILE_LINES(f, /COMPRESS)
>>>
>>> where f is a basic gzipped file.
>>>
>>> Now, this returns zero for me.
>>>
>>> Anyone else using FILE_LINES with compressed files?
>>>
>>> Here's a concrete example:
>>>
>>> IDL> f='LYLOUT_120522_030000_3600.dat.gz'
>>>
>>> (File available here: https://goo.gl/ROaE3J)
>>>
>>> Under 8.4, I get:
>>> IDL> file_lines(f, /compress)
>>> 123806
>>>
>>> but under 8.5 I get:
>>> IDL> file_lines(f, /compress)
>>> 0
>>>
>>> The file really is gzipped:
>>> $ file LYLOUT_120522_030000_3600.dat.gz
>>> LYLOUT_120522_030000_3600.dat.gz: gzip compressed data, was "LYLOUT_120522_030000_3600.dat", from Unix, last modified: Sat Jul 7 08:30:46 2012, max compression
>>>
>>> Running on Mac 10.9.5 FWIW.
>
> Yep, I was able to reproduce this. In IDL 8.5 we fixed a different bug to allow GZ files greater than 4 Gb to work properly. That fix inadvertently broke file_lines with gzip compressed files.
>
> It will be fixed in the next IDL version.
>
> Thanks for reporting!
>
> -Chris
hi Chris,
Can you give us more details about the change with respect to opening zipped files larger than 4GB?
thanks
Mark
|
|
|