UPDATE: Crash on new look (was:Re: pager and background)

jack (jack@germanium.xtalwind.net)
Fri, 25 Jun 1999 15:20:39 -0400 (EDT)


If I don't have WinList running, or if I have any app running so
that it shows in WinList, no crashes.  If WinList has no entries,
boom.

When WinList isn't in the way selecting look.DeepBlue,
look.Metallic, or look.Water crashes the Pager with a Floating
Point exception.  

look.DeepBlue produces "aftersetp: unknown style: focused_colors"
look.Metallic and look.Water don't generate any error messages.

The Pager.core files all point to the same problem.  
asimagelib/stepgfx.c at line 317:
  c1 = ((float) maxcols / 2.0) * ((float) py / (float) ((h - pd * 2) - 1));

if pd == 0 and h == 1
 ((h - pd * 2) - 1)
 ((1 - 0  * 2) - 1)
 ((    1     ) - 1)  == 0
which leads to
...  py / (float) 0 

(IIRC, it was something like that on an NT box that left one of
the U.S. Navy's ships dead in the water for a few hours. :)

Changing (h - pd * 2)  to ((h - pd) * 2) prevents the divide by
zero and things seem to work ok, but I don't know if it breaks
the algorithm.

--------------------------------------------------------------------------
Jack O'Neill                    Systems Administrator / Systems Analyst
jack@germanium.xtalwind.net     Crystal Wind Communications, Inc.
          Finger jack@germanium.xtalwind.net for my PGP key.
   PGP Key fingerprint = F6 C4 E6 D4 2F 15 A7 67   FD 09 E9 3C 5F CC EB CD
               enriched, vcard, HTML messages > /dev/null
--------------------------------------------------------------------------



--
   WWW:   http://www.afterstep.org/
   FTP:   ftp://ftp.afterstep.org/
   MAIL:  http://www.calderasystems.com/linuxcenter/forums/afterstep.html