emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash on loading image


From: Pavel Janík
Subject: Re: Crash on loading image
Date: Wed, 06 Feb 2002 16:02:48 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: address@hidden (François Pinard)
   Date: 05 Feb 2002 11:26:09 -0500

Hi again François,

   > The symptom is that the Emacs frame vanishes when I load a particular 
image,
   > I then have to restart a new Emacs session.  I reproduced the problem using
   > 
   >    emacs -q -f auto-image-file-mode images/pixels/exemples/x1.gif
   > 
   > with this content for `xi.gif':

can you please test this? I will provide ChangeLog entry later. To tired
right now...

This will be needed in RC and in HEAD. I'm CCing emacs-devel because we
need to get more testing for this. If you would like to know why to test
this, just try the above recipe with attached pictures. I have tested this
on a package of about 1400 pictures and only one of them (attached
opensign.gif) had the same problem (we used Screen Width of GIF, but it was
to small) and thus we crashed.

--- xfns.c.~1.537.~     Tue Jan 22 16:16:44 2002
+++ xfns.c      Wed Feb  6 15:49:29 2002
@@ -10161,8 +10161,8 @@
       return 0;
     }
 
-  width = img->width = gif->SWidth;
-  height = img->height = gif->SHeight;
+  width = img->width = max (gif->SWidth, gif->Image.Left + gif->Image.Width);
+  height = img->height = max(gif->SHeight, gif->Image.Top + gif->Image.Height);
 
   /* Create the X image and pixmap.  */
   if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))

-- 
Pavel Janík

Emperical studies shows that in English, the set of persons covered by the
word "someone" always exclude the speaker, so don't suggest anything.
                  --  Per Abrahamsen in emacs-devel

Attachment: opensign.gif
Description: GIF image

Attachment: x1.gif
Description: GIF image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]