* A redisplay bug in 22.0.99?
@ 2007-05-11 14:41 Juanma Barranquero
2007-05-11 14:49 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Juanma Barranquero @ 2007-05-11 14:41 UTC (permalink / raw)
To: Emacs-Devel
With 22.0.99 on Windows:
emacs -Q
C-x d etc/images/ <RET>
C-n C-o => display README
C-5 C-n C-o => display cancel.pbm
cancel.pbm is shown as an empty box in the lower window, which is not
correctly redrawn (it has leftover pixels from the previous contents).
Does anyone else see this?
Juanma
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: A redisplay bug in 22.0.99?
2007-05-11 14:41 A redisplay bug in 22.0.99? Juanma Barranquero
@ 2007-05-11 14:49 ` Drew Adams
2007-05-11 15:12 ` Jason Rumney
2007-05-11 15:42 ` Eli Zaretskii
2 siblings, 0 replies; 16+ messages in thread
From: Drew Adams @ 2007-05-11 14:49 UTC (permalink / raw)
To: Emacs-Devel
>> Does anyone else see this?
I see it, in GNU Emacs 22.0.96.1 (i386-mingw-nt5.1.2600)
of 2007-03-21 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 14:41 A redisplay bug in 22.0.99? Juanma Barranquero
2007-05-11 14:49 ` Drew Adams
@ 2007-05-11 15:12 ` Jason Rumney
2007-05-11 16:23 ` Johan Bockgård
2007-05-11 15:42 ` Eli Zaretskii
2 siblings, 1 reply; 16+ messages in thread
From: Jason Rumney @ 2007-05-11 15:12 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Emacs-Devel
Juanma Barranquero wrote:
> cancel.pbm is shown as an empty box in the lower window, which is not
> correctly redrawn (it has leftover pixels from the previous contents).
>
> Does anyone else see this?
Not displaying pgm images correctly is caused by the following recent
change:
2007-03-18 Chong Yidong <cyd@stupidchicken.com>
* image.c (pbm_load): Signal error for invalid image size.
I'm not sure whether the garbaged display after an image error is w32
specific or not. Before release it is probably best to at least verify
that we are not drawing from uninitialised memory in this case, as that
could cause a crash.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 14:41 A redisplay bug in 22.0.99? Juanma Barranquero
2007-05-11 14:49 ` Drew Adams
2007-05-11 15:12 ` Jason Rumney
@ 2007-05-11 15:42 ` Eli Zaretskii
2007-05-11 15:59 ` Juanma Barranquero
2007-05-11 16:27 ` Andreas Schwab
2 siblings, 2 replies; 16+ messages in thread
From: Eli Zaretskii @ 2007-05-11 15:42 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-devel
> Date: Fri, 11 May 2007 16:41:52 +0200
> From: "Juanma Barranquero" <lekktu@gmail.com>
>
> emacs -Q
>
> C-x d etc/images/ <RET>
> C-n C-o => display README
> C-5 C-n C-o => display cancel.pbm
>
> cancel.pbm is shown as an empty box in the lower window, which is not
> correctly redrawn (it has leftover pixels from the previous contents).
Could it be that cancel.pbm is corrupted? Can you display it using
some other program?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 15:42 ` Eli Zaretskii
@ 2007-05-11 15:59 ` Juanma Barranquero
2007-05-11 16:06 ` David Kastrup
2007-05-11 17:32 ` Eli Zaretskii
2007-05-11 16:27 ` Andreas Schwab
1 sibling, 2 replies; 16+ messages in thread
From: Juanma Barranquero @ 2007-05-11 15:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On 5/11/07, Eli Zaretskii <eliz@gnu.org> wrote:
> Could it be that cancel.pbm is corrupted?
If so, it is corrupted on the CVS repository; I just checked it out anew.
> Can you display it using some other program?
I don't have any other program able to display .pbm images (that I know of).
Do you see the problem?
Juanma
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 15:59 ` Juanma Barranquero
@ 2007-05-11 16:06 ` David Kastrup
2007-05-11 16:11 ` Jason Rumney
2007-05-11 17:36 ` Eli Zaretskii
2007-05-11 17:32 ` Eli Zaretskii
1 sibling, 2 replies; 16+ messages in thread
From: David Kastrup @ 2007-05-11 16:06 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Eli Zaretskii, emacs-devel
"Juanma Barranquero" <lekktu@gmail.com> writes:
> On 5/11/07, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Could it be that cancel.pbm is corrupted?
>
> If so, it is corrupted on the CVS repository; I just checked it out
> anew.
You are a Windows user, so it could also be a CVS/line ending/binary
problem not seen on other platforms.
> I don't have any other program able to display .pbm images (that I know of).
>
> Do you see the problem?
Not on my current 22.0.91 and I doubt there have been changes since then.
--
David Kastrup
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 16:06 ` David Kastrup
@ 2007-05-11 16:11 ` Jason Rumney
2007-05-11 17:36 ` Eli Zaretskii
1 sibling, 0 replies; 16+ messages in thread
From: Jason Rumney @ 2007-05-11 16:11 UTC (permalink / raw)
To: David Kastrup; +Cc: Juanma Barranquero, Eli Zaretskii, emacs-devel
David Kastrup wrote:
> Not on my current 22.0.91 and I doubt there have been changes since then.
When was 22.0.91 current? We are up to 22.0.99 now, and the change
causing this problem was made on 18 March.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 15:12 ` Jason Rumney
@ 2007-05-11 16:23 ` Johan Bockgård
0 siblings, 0 replies; 16+ messages in thread
From: Johan Bockgård @ 2007-05-11 16:23 UTC (permalink / raw)
To: emacs-devel
Jason Rumney <jasonr@gnu.org> writes:
> I'm not sure whether the garbaged display after an image error is w32
> specific or not.
I see the problem with GNU Emacs 22.1.50.5 (x86_64-unknown-linux-gnu,
X toolkit) of 2007-05-11 on muon
emacs -Q etc/images/cancel.pbm
Instead of the correct image I see an image of a mouse cursor (arrow,
I, or busy cursor).
--
Johan Bockgård
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 15:42 ` Eli Zaretskii
2007-05-11 15:59 ` Juanma Barranquero
@ 2007-05-11 16:27 ` Andreas Schwab
2007-05-11 21:28 ` James Cloos
1 sibling, 1 reply; 16+ messages in thread
From: Andreas Schwab @ 2007-05-11 16:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Juanma Barranquero, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Fri, 11 May 2007 16:41:52 +0200
>> From: "Juanma Barranquero" <lekktu@gmail.com>
>>
>> emacs -Q
>>
>> C-x d etc/images/ <RET>
>> C-n C-o => display README
>> C-5 C-n C-o => display cancel.pbm
>>
>> cancel.pbm is shown as an empty box in the lower window, which is not
>> correctly redrawn (it has leftover pixels from the previous contents).
>
> Could it be that cancel.pbm is corrupted?
The problem appears to be that this is actually a PGM.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 15:59 ` Juanma Barranquero
2007-05-11 16:06 ` David Kastrup
@ 2007-05-11 17:32 ` Eli Zaretskii
1 sibling, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2007-05-11 17:32 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-devel
> Date: Fri, 11 May 2007 17:59:09 +0200
> From: "Juanma Barranquero" <lekktu@gmail.com>
> Cc: emacs-devel@gnu.org
>
> Do you see the problem?
Yes. But other *.pbm files display okay.
And Gimp seems to display cancel.pbm allright, so the file is fine.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 16:06 ` David Kastrup
2007-05-11 16:11 ` Jason Rumney
@ 2007-05-11 17:36 ` Eli Zaretskii
1 sibling, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2007-05-11 17:36 UTC (permalink / raw)
To: David Kastrup; +Cc: lekktu, emacs-devel
> Cc: "Eli Zaretskii" <eliz@gnu.org>, emacs-devel@gnu.org
> From: David Kastrup <dak@gnu.org>
> Date: Fri, 11 May 2007 18:06:16 +0200
>
> You are a Windows user, so it could also be a CVS/line ending/binary
> problem not seen on other platforms.
No, it isn't: I checkout all files with -kb, and I still see the
problem.
> > Do you see the problem?
>
> Not on my current 22.0.91 and I doubt there have been changes since then.
In 22.0.91 I don't see the problem on Windows as well.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 16:27 ` Andreas Schwab
@ 2007-05-11 21:28 ` James Cloos
2007-05-11 22:37 ` Glenn Morris
0 siblings, 1 reply; 16+ messages in thread
From: James Cloos @ 2007-05-11 21:28 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Juanma Barranquero, Eli Zaretskii, emacs-devel
>>>>> "Andreas" == Andreas Schwab <schwab@suse.de> writes:
Andreas> The problem appears to be that this is actually a PGM.
I thought that was the (entirety) of the problem as well, but simply
renameing the file to cancel.pgm does not let emacs display it
correctly.
Running pnmnoraw on it, and saving that to cancel.pgm does fix the
file so that emacs can display it.
The file is a correct P5 raw PGM file. It starts out with:
,----[ head -4 /cvs-src/emacs/etc/images/cancel.pbm ]
| P5
| # CREATOR: The GIMP's PNM Filter Version 1.0
| 24 24
| 255
`----
and the rest of the files is 576 octets, exactly correct for a 24x24
pixel P5 with maxval=255.
Removing the comment does not make a difference.
So emacs must have a bug displaying raw (P5 magic) PGM files that is
not tripped with ascii (P2 magic) PGM files.
Converting it to a proper PBM (P4 magic) also works. Just run
pgmtopbm from the netpbm package on it.
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 21:28 ` James Cloos
@ 2007-05-11 22:37 ` Glenn Morris
2007-05-11 23:24 ` James Cloos
2007-05-12 4:24 ` Glenn Morris
0 siblings, 2 replies; 16+ messages in thread
From: Glenn Morris @ 2007-05-11 22:37 UTC (permalink / raw)
To: James Cloos
Cc: Andreas Schwab, Eli Zaretskii, emacs-devel, Juanma Barranquero
James Cloos wrote:
>>>>>> "Andreas" == Andreas Schwab <schwab@suse.de> writes:
>
> Andreas> The problem appears to be that this is actually a PGM.
>
> I thought that was the (entirety) of the problem as well, but simply
> renameing the file to cancel.pgm does not let emacs display it
> correctly.
Perhaps something like this.
*** image.c 18 Mar 2007 23:09:57 -0000 1.65
--- image.c 11 May 2007 22:37:36 -0000
***************
*** 5742,5750 ****
}
else
{
! if (raw_p && (p + 3 * height * width > end))
{
x_destroy_x_image (ximg);
image_error ("Invalid image size in image `%s'",
img->spec, Qnil);
goto error;
--- 5742,5751 ----
}
else
{
! if (raw_p && (p + (type == PBM_GRAY ? 1 : 3) * height * width > end))
{
x_destroy_x_image (ximg);
+ x_clear_image (f, img);
image_error ("Invalid image size in image `%s'",
img->spec, Qnil);
goto error;
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 22:37 ` Glenn Morris
@ 2007-05-11 23:24 ` James Cloos
2007-05-12 4:24 ` Glenn Morris
1 sibling, 0 replies; 16+ messages in thread
From: James Cloos @ 2007-05-11 23:24 UTC (permalink / raw)
To: Glenn Morris
Cc: Andreas Schwab, Eli Zaretskii, emacs-devel, Juanma Barranquero
>>>>> "Glenn" == Glenn Morris <rgm@gnu.org> writes:
Glenn> Perhaps something like this.
,----
|
| *** image.c 18 Mar 2007 23:09:57 -0000 1.65
| --- image.c 11 May 2007 22:37:36 -0000
| ***************
| *** 5742,5750 ****
| }
| else
| {
| ! if (raw_p && (p + 3 * height * width > end))
| {
| x_destroy_x_image (ximg);
| image_error ("Invalid image size in image `%s'",
| img->spec, Qnil);
| goto error;
| --- 5742,5751 ----
| }
| else
| {
| ! if (raw_p && (p + (type == PBM_GRAY ? 1 : 3) * height * width > end))
| {
| x_destroy_x_image (ximg);
| + x_clear_image (f, img);
| image_error ("Invalid image size in image `%s'",
| img->spec, Qnil);
| goto error;
`----
Yes, that does look like a necessary fix.
-JimC
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-11 22:37 ` Glenn Morris
2007-05-11 23:24 ` James Cloos
@ 2007-05-12 4:24 ` Glenn Morris
2007-05-12 13:40 ` Chong Yidong
1 sibling, 1 reply; 16+ messages in thread
From: Glenn Morris @ 2007-05-12 4:24 UTC (permalink / raw)
To: Chong Yidong; +Cc: emacs-devel
Glenn Morris wrote:
> Perhaps something like this.
Alternatively, since the check is not made for PBM_MONO, maybe it
should just not be made for PBM_GRAY? Alternatively alternatively,
maybe PBM_MONO should be checked in the same way?
It was your change originally, can you comment?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: A redisplay bug in 22.0.99?
2007-05-12 4:24 ` Glenn Morris
@ 2007-05-12 13:40 ` Chong Yidong
0 siblings, 0 replies; 16+ messages in thread
From: Chong Yidong @ 2007-05-12 13:40 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
Glenn Morris <rgm@gnu.org> writes:
> Glenn Morris wrote:
>
>> Perhaps something like this.
>
> Alternatively, since the check is not made for PBM_MONO, maybe it
> should just not be made for PBM_GRAY? Alternatively alternatively,
> maybe PBM_MONO should be checked in the same way?
>
> It was your change originally, can you comment?
I don't know the pbm format very well; any patch that fixes this bug
is fine by me, as long as the original bug remains fixed:
http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00335.html
That bug actually caused Emacs to crash, rather than refusing to
display an image.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2007-05-12 13:40 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 14:41 A redisplay bug in 22.0.99? Juanma Barranquero
2007-05-11 14:49 ` Drew Adams
2007-05-11 15:12 ` Jason Rumney
2007-05-11 16:23 ` Johan Bockgård
2007-05-11 15:42 ` Eli Zaretskii
2007-05-11 15:59 ` Juanma Barranquero
2007-05-11 16:06 ` David Kastrup
2007-05-11 16:11 ` Jason Rumney
2007-05-11 17:36 ` Eli Zaretskii
2007-05-11 17:32 ` Eli Zaretskii
2007-05-11 16:27 ` Andreas Schwab
2007-05-11 21:28 ` James Cloos
2007-05-11 22:37 ` Glenn Morris
2007-05-11 23:24 ` James Cloos
2007-05-12 4:24 ` Glenn Morris
2007-05-12 13:40 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.