Re: PNG dies with X Error of failed request

>>Hi,
>>
>>I already posted previously a code and two PNG images that causes X
>>request failure on XFree86. Now I discovered, that the failure
>>I reported probably occurs because one of the PNG images doesn't have
>>enough space. I can reproduce the problem with a code below, using any
>>PNG image as it's argument, as follows:
>>
>>When the window appears, use mouse on the down right corner of the
>>window to make the window smaller. X request failure occurs
>>immediately (at least on my system):
>>
>>X Error of failed request:  BadMatch (invalid parameter attributes)
>>  Major opcode of failed request:  73 (X_GetImage)
>>  Serial number of failed request:  447
>>  Current serial number in output stream:  447 ...
>>______
>>#!/usr/bin/env perl
>>
>>use Tk;
>>use Tk::PNG;
>>$mw = new MainWindow;
>>$b1 = $mw->Button->pack;
>>$b1->configure(-image => $mw->Photo(-format => 'png', -file => $ARGV[0]));
>>MainLoop;
>>
>>__END__
>>
> 
> It works fine for me on linux. Maybe you need to get the latest
> libpng?
> 
> I'm using libpng12.so.0.1.2.5
> 

Can you resize the window (make it smaller than the image)?

I have that one too on my system, but Tk::PNG seems to be linked to a
different one: /usr/lib/libpng, namely to
/usr/lib/libpng.so.3.1.2.5:

ldd /usr/lib/perl5/site_perl/5.8.3/i586-linux-thread-multi/auto/Tk/PNG/PNG.so
        linux-gate.so.1 =>  (0xffffe000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0x40006000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40034000)
        libm.so.6 => /lib/libm.so.6 (0x40045000)
        libc.so.6 => /lib/libc.so.6 (0x40067000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Anyway, I tried to link libpng.so.3 to libpng12.so.0.1.2.5, ldconfig and run
the test again - same result.

Maybe we use different versions of Tk::PNG or Tk?
My are 4.003 and 804.027:
$ perl -M'Tk::PNG 1000' 
Tk::PNG version 1000 required--this is only version 4.003.
$ perl -M'Tk 1000'
Tk version 1000 required--this is only version 804.027.

I can reproduce it on SuSE 9.1 and RH9 boxes.
Cheers,



--- GoldED/386 2.42.G0614+
 * Origin: Everything goes the bach runter ... 
 * http://casino-www.net
 * http://casino-www.org

Received on Saturday, 31 July 2004 15:05:20 UTC