Subject: | transform2() corrupting memory on Win32 |
Date: | Mon, 17 Oct 2011 11:42:07 +1100 |
To: | bug-Imager [...] rt.cpan.org |
From: | tonyc [...] cpan.org |
At least apparently:
C:\Users\tony\dev\imager\git\imager>perl -Mblib t\t58trans2.t
1..38
ok 1 - use Imager;
ok 2 - returned an image on error
ok 3 - No error message on failure
ok 4 - synthesis failed
# 0
Cannot write testout/t56a.ppm: can only save 1 or 3 channel images to pnm at t\t
58trans2.t line 32.
myfree_file_line: INCONSISTENT REFCOUNT 0 at image.c (274)
#!perl -w
use Imager;
use Test::More;
# my $im1 = Imager->new();
# $im1->open(file=>'testimg/penguin-base.ppm', type=>'pnm')
# || die "Cannot read image";
# my $im2 = Imager->new();
# $im2->open(file=>'testimg/scale.ppm',type=>'pnm')
# || die "Cannot read testimg/scale.ppm";
# # error handling
# my $opts = { rpnexpr=>'x x 10 / sin 10 * y + get1' };
# my $im3 = Imager::transform2($opts);
# ok(!$im3, "returned an image on error");
# ok(defined($Imager::ERRSTR), "No error message on failure");
# image synthesis
#my $expr = 'x y cx cy distance !d y cy - x cx - atan2 !a @d 10 / @a + 3.1416 2
* % !a2 @a2 cy * 3.1416 / 1 @a2 sin 1 + 2 / hsv';
my $expr = '0 0 0 rgb';
my $im4 = Imager::transform2({
width=>300, height=>300,
rpnexpr=>$expr});
#ok($im4, "synthesis failed");
# if ($im4) {
# print "# ", $im4->getchannels, "\n";
# $im4->write(type=>'pnm', file=>'testout/t56a.ppm')
# || die "Cannot write testout/t56a.ppm: ", $im4->errstr;
# }
C:\Users\tony\dev\imager\git\imager>perl -Mblib foo.pl
myfree_file_line: INCONSISTENT REFCOUNT 0 at image.c (274)