Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 35139
Status: resolved
Priority: 40/
Queue: Imager

People
Owner: Nobody in particular
Requestors: christianc [...] sitesell.com
Cc:
AdminCc:

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



Subject: bug in Imager 0.63
Date: Thu, 17 Apr 2008 03:40:37 +0000
To: bug-Imager [...] rt.cpan.org
From: Christian Carey <christianc [...] sitesell.com>
Download (untitled) / with headers
text/plain 992b
Hello there, I believe that I’ve found a bug in Imager 0.63; fortunately, the bug is easily fixed. Within Imager.pm, in the _get_reader_io and _get_writer_io subroutines, at lines 1200 and 1251 respectively, is unless ($fd) { but these lines ought to be unless (defined $fd) { The reason for this is that a zero-value returned from fileno() [at lines 1199 and 1250 respectively] is a valid file descriptor value. Since fileno() returns undef rather than zero on a closed filehandle, the change outlined above should be applied to lines 1200 and 1251, so that the “Handle in fh option not opened” error is only generated when the filehandle is actually not open. Please let me know if you have any questions or concerns with the proposed fix above. I look forward to the next release of Imager — it will allow me to finish writing a regression test which depends upon this bug being fixed! Thank you, Christian. -- Christian Carey christianc@sitesell.com
Download (untitled) / with headers
text/plain 1.1k
On Wed Apr 16 23:41:03 2008, christianc@sitesell.com wrote: Show quoted text
> Hello there, > > I believe that I’ve found a bug in Imager 0.63; fortunately, the bug is > easily fixed. Within Imager.pm, in the _get_reader_io and _get_writer_io > subroutines, at lines 1200 and 1251 respectively, is > > unless ($fd) { > > but these lines ought to be > > unless (defined $fd) { > > The reason for this is that a zero-value returned from fileno() [at > lines 1199 and 1250 respectively] is a valid file descriptor value. > Since fileno() returns undef rather than zero on a closed filehandle, > the change outlined above should be applied to lines 1200 and 1251, so > that the “Handle in fh option not opened” error is only generated when > the filehandle is actually not open. > > Please let me know if you have any questions or concerns with the > proposed fix above. I look forward to the next release of Imager — it > will allow me to finish writing a regression test which depends upon > this bug being fixed!
Thank you for your report. This is fixed in svn. I expect I'll do a release soon, since a more serious bug has also been reported and fixed. Tony
Download (untitled) / with headers
text/plain 854b
On Wed Apr 16 23:41:03 2008, christianc@sitesell.com wrote: Show quoted text
> Hello there, > > I believe that I’ve found a bug in Imager 0.63; fortunately, the bug is > easily fixed. Within Imager.pm, in the _get_reader_io and _get_writer_io > subroutines, at lines 1200 and 1251 respectively, is > > unless ($fd) { > > but these lines ought to be > > unless (defined $fd) { > > The reason for this is that a zero-value returned from fileno() [at > lines 1199 and 1250 respectively] is a valid file descriptor value. > Since fileno() returns undef rather than zero on a closed filehandle, > the change outlined above should be applied to lines 1200 and 1251, so > that the “Handle in fh option not opened” error is only generated when > the filehandle is actually not open.
Hi, I've just released Imager 0.64 which fixes this problem. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.