From nobody@FreeBSD.ORG  Mon Jun 26 03:04:38 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 8E07037BBFA; Mon, 26 Jun 2000 03:04:38 -0700 (PDT)
Message-Id: <20000626100438.8E07037BBFA@hub.freebsd.org>
Date: Mon, 26 Jun 2000 03:04:38 -0700 (PDT)
From: rdls@rdls.net
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: xli-1.17.0 fillscreen option paints white screen
X-Send-Pr-Version: www-1.0

>Number:         19518
>Category:       ports
>Synopsis:       xli-1.17.0 fillscreen option paints white screen
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jkoshy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 26 03:10:06 PDT 2000
>Closed-Date:    Tue Oct 31 01:40:12 PST 2000
>Last-Modified:  Tue Oct 31 01:45:05 PST 2000
>Originator:     Richard Smith
>Release:        5.0-CURRENT and 3.4-RELEASE
>Organization:
TRL Technology Ltd
>Environment:
FreeBSD chaos.sw.wan 5.0-20000506-CURRENT FreeBSD 
5.0-20000506-CURRENT #3: Wed Jun 14 09:45:39 BST 2000     
richard@chaos.sw.wan:/usr/src/sys/compile/CHAOS  i386

>Description:
Using xli to paint the background where the image requires scaling, 
e.g. scaling a 1280x960 image to a 1280x1024 screen resolution.

Xli-1.17.0 (using the -fillscreen option) paints a white screen, 
whereas xli-1.16 functioned correctly. The problem is independent of
FreeBSD version and XServer.
>How-To-Repeat:
Using either 3.4-RELEASE or 5.0-CURRENT, with either an XFree86 XServer 
or the Xig XServer, on a 1280x1024 screen...

xli -onroot -fillscreen daemon1-HQ-1280x960.jpg

>Fix:
use xli-1.16 (if you can still find it)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->jkoshy 
Responsible-Changed-By: steve 
Responsible-Changed-When: Thu Jul 6 18:44:12 PDT 2000 
Responsible-Changed-Why:  
Over to port's maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19518 

From: <jkoshy@FreeBSD.org>
To: smar@reptiles.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/19518: bug report on xli-1.17
Date: Tue, 31 Oct 2000 00:40:07 -0800 (PST)

 Hi,
 
 I thought I'd forward a bug report on xli v1.17 to you:
 
 The -onroot and -fillscreen options interact unexpectedly to yield 
 an all white root window when the image being loaded has to be zoomed.
 
 According to the original bug report (available at
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19518), the bug is independent
 of the X server & OS version, and was NOT present in the previous version
 of xli.
 
 Test env: 1024x768 16bpp X server
           xli v1.17 
   	  /usr/X11R6/share/xfce/backdrops/A-Little-Exercise-3.jpg
  	  [ 512x512 JPEG image, color space YCbCr, 3 comps., Huffman coding ]
 	  FreeBSD 4-STABLE
 
 Test command:
 xli -onroot -fillscreen /usr/X11R6/share/xfce/backdrops/A-Little-Exercise-3.jpg
 
 Here is a GDB trace:
 
 
   (gdb) bt
   #0  clip (iimage=0x80d00c0, clipx=0, clipy=-2147483520, clipw=1024, cliph=768,
       imgopp=0x80a9000) at clip.c:19
   #1  0x8071d2d in main (argc=4, argv=0xbfbffa6c) at xli.c:376
   #2  0x804a9a5 in _start ()
 
 Note the absurd clipy value.
 
 The image was zoomed 200% as determined by the following code fragment:
 
   "xli.c"
   329			io->xzoom = io->yzoom = (((wr < hr) ^
   330				(globals.onroot && globals.fillscreen)) ?
   331				wr : hr) * 100 + 0.5;
 
   (gdb) p io->xzoom
   $50 = 200
   (gdb) p io->yzoom
   $51 = 200
 
 Consequently, the zoomed image is a 1024x1024 image being loaded onto a
 1024x768 screen.
 
   "xli.c"
   371			if (!images[0].ats) {
   372				atx = (winwidth - inew->width) / 2;
   373				aty = (winheight - inew->height) / 2;
   374			}
 
   (gdb) p atx
   $59 = 0
   (gdb) p aty
   $60 = 2147483520
 
 Since { winheight < inew->height }, you now have a negative value of { clipy }:
 being passed into function { clip() }, and this results in nothing from the
 original image being copied into the new image created in { clip() }.
 
 Hence the blank screen.
 
 Regards,
 Koshy
 
State-Changed-From-To: open->closed 
State-Changed-By: jkoshy 
State-Changed-When: Tue Oct 31 01:40:12 PST 2000 
State-Changed-Why:  
The bug turned out to be a genuine problem in the application. 
The programs author has been notified. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=19518 
>Unformatted:
