|Subject:||segv on data()|
|Date:||Sat, 06 Aug 2011 09:57:36 +1000|
|To:||bug-Tk-TIFF [...] rt.cpan.org|
|From:||Kevin Ryde <user42 [...] zip.com.au>|
With recent debian i386 perl-tk 1:804.029, perl 5.12.4, and my own build of Tk-TIFF 0.10 or 0.10_51, asking for $photo->data(-format=>'TIFF') gets a segv, per foo.pl below. Putting it under gdb suggests CommonWriteTIFF() is reached with some dodgy blockPtr, with the width and height there being garbage and which ckalloc() then either gives NULL or an abort(). A $photo->write('/some/file.tiff') seems fine though.
use strict; use Tk; use Tk::TIFF; print Tk->VERSION,"\n"; print Tk::TIFF->VERSION,"\n"; my $mw = MainWindow->new; my $photo = $mw->Photo (-width => 32, -height => 32); $photo->put ("#FF00FF", -to => 0,0,32,32); $photo->data(-format => 'TIFF'); print "done\n"; exit 0;