Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 73701
Status: resolved
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: micke.green [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: “Out of memory” with simple Win32::Unicode::File readline loop and Strawberry Perl
The issue I have can be found by running the following code in Strawberry perl 5.12.3.0 on Windows XP. #!/usr/bin/perl -w use strict; use warnings; use Win32::Unicode::File; use Encode; my $fname = shift @ARGV; my $fh = Win32::Unicode::File->new; if ($fh->open('<', $fname)){ while (my $line = $fh->readline()){} close $fh; }else{ print "Couldn't open file: $!\n"; } The only thing that is happening here is that I perform a readline and this keeps eating memory until I get an Out of memory error from Strawberry perl. I am using a really big file but since this code is stream based it shouldn't matter. Am I missing something here or is there a leak somewhere in Strawberry perl? I tested the exactly same code in ActivePerl and there it works fine, i.e., it doesn't eat memory.
Subject: ExampleCode.pl
#!/usr/bin/perl -w use strict; use warnings; use Win32::Unicode::File; use Encode; my $fname = shift @ARGV; my $fh = Win32::Unicode::File->new; if ($fh->open('<', $fname)){ while (my $line = $fh->readline()){} close $fh; }else{ print "Couldn't open file: $!\n"; }
Could you please check the latest strawberry perl version 5.14.x from http://strawberryperl.com/package/kmx/p5.14.2.1-RC/ ?

--
kmx

Could you please try the latest strawberry perl 5.14.2.1?

--
kmx