GNU bug report logs - #22442
25.0.50; --with-cairo does not display PNG on GNU/Linux

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sat, 23 Jan 2016 08:28:02 UTC

Severity: normal

Tags: help

Merged with 21110

Found in version 25.0.50

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22442 in the body.
You can then email your comments to 22442 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sat, 23 Jan 2016 08:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 23 Jan 2016 08:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports and feature requests <bug-gnu-emacs <at> gnu.org>
Subject: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 00:27:08 -0800
To reproduce the problem, configure Emacs --with-cairo, and then run these shell 
commands:

wget https://upload.wikimedia.org/wikipedia/commons/f/f5/All_palaeotemps.png
emacs -Q All_palaeotemps.png

Emacs shows a blank (or sometimes garbled) screen instead of the image.

I think the problem is that lookup_rgb_color is returning garbage.

Here are more details about the configuration, built on Fedora 23 x86-64:

In GNU Emacs 25.0.50.55 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.6, cairo 
version 1.14.2)
 of 2016-01-22 built on penguin.cs.ucla.edu
Repository revision: 27a0919cde7a6dce93aeba63b5ce7d0834f48531
Configured using:
 'configure --enable-gcc-warnings --with-cairo'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: en_US.utf8
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LANG: C
  locale-coding-system: utf-8-unix




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sat, 23 Jan 2016 09:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 22442 <at> debbugs.gnu.org
Cc: Jan D <jan.h.d <at> swipnet.se>
Subject: Re: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 01:12:03 -0800
I installed a patch which should make Bug#22442 easier to reproduce:

./configure --with-cairo --enable-checking
make
wget https://upload.wikimedia.org/wikipedia/commons/f/f5/All_palaeotemps.png
src/emacs -Q All_palaeotemps.png

This should make Emacs dump core.

I'll CC: this to Jan D. as he's expert in this area.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sat, 23 Jan 2016 09:25:01 GMT) Full text and rfc822 format available.

Message #11 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 22442 <at> debbugs.gnu.org
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 11:24:28 +0200
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Sat, 23 Jan 2016 00:27:08 -0800
> 
> To reproduce the problem, configure Emacs --with-cairo, and then run these shell 
> commands:
> 
> wget https://upload.wikimedia.org/wikipedia/commons/f/f5/All_palaeotemps.png
> emacs -Q All_palaeotemps.png
> 
> Emacs shows a blank (or sometimes garbled) screen instead of the image.

Due to this and other issues with Cairo, and the lack of an active
developer who could work on fixing them, should we perhaps say in NEWS
that --with-cairo is still experimental?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sat, 23 Jan 2016 09:26:01 GMT) Full text and rfc822 format available.

Message #14 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 22442 <at> debbugs.gnu.org, jan.h.d <at> swipnet.se
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 11:25:15 +0200
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Sat, 23 Jan 2016 01:12:03 -0800
> Cc: Jan D <jan.h.d <at> swipnet.se>
> 
> I'll CC: this to Jan D. as he's expert in this area.

Alas, Jan is no longer working on Emacs.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sat, 23 Jan 2016 09:45:02 GMT) Full text and rfc822 format available.

Message #17 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 22442 <at> debbugs.gnu.org
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 01:44:21 -0800
Eli Zaretskii wrote:
> should we perhaps say in NEWS
> that --with-cairo is still experimental?

Sounds good, thanks, I added a couple of lines to that effect.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sun, 24 Jan 2016 00:32:01 GMT) Full text and rfc822 format available.

Message #20 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 22442 <at> debbugs.gnu.org
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sat, 23 Jan 2016 16:31:19 -0800
The bug appears to have been "fixed" by this commit:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=190d365f90d741b09e817d9878afd256505e1944

I don't know how to explain this. Possibly Emacs tries to convert a pixel to 
RGB, this signals an error, and then Emacs falls back on something else that 
works. Hard to believe that this is the desired behavior, so I'll leave 
Bug#22442 open.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sun, 24 Jan 2016 06:40:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Sun, 24 Jan 2016 01:38:59 -0500
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> The bug appears to have been "fixed" by this commit:
>
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=190d365f90d741b09e817d9878afd256505e1944
>
> I don't know how to explain this. Possibly Emacs tries to convert a
> pixel to RGB, this signals an error, and then Emacs falls back on
> something else that works. Hard to believe that this is the desired
> behavior, so I'll leave Bug#22442 open.

From ./configure --help it looks like emacs automatically picks up
imagemagick. This issue may be the same as reported in bug#21110




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Sun, 24 Jan 2016 08:50:01 GMT) Full text and rfc822 format available.

Message #26 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alexander Kuleshov <kuleshovmail <at> gmail.com>
Cc: 22442 <at> debbugs.gnu.org
Subject: Re: [PATCH] Fix compilation erorr when --enable-gcc-warnings passed
Date: Sun, 24 Jan 2016 00:49:31 -0800
Alexander Kuleshov wrote:
> Even without it I can't reproduce this bug. I've checkout to the previous
> commit (035bd8159fe5bcea15eacc8a23ab54f4bc3b6f17) and configured and
> built emacs with:
>
> ./configure --enable-link-time-optimization --without-pop \
> --without-kerberos --without-kerberos5 --without-hesiod   \
> --with-sound=alsa --with-x-toolkit=gtk3 --with-xpm --with-jpeg \
> --with-tiff --with-gif --with-png --with-rsvg --with-cairo     \
> --with-xml2 --with-imagemagick --with-xft --without-libotf     \
> --with-xim --with-xaw3d --with-dbus --without-gconf            \
> --without-gsettings --without-selinux --with-gnutls --with-zlib \
> --with-modules --with-file-notification=inotify --without-makeinfo \
> --with-x && make
>
> Than I've opened image as you described in thehttp://bugs.gnu.org/22442
> and it works perfectly for me.

I tried the same scenario and I get a blank image on the screen. Perhaps it 
depends on the imagemagick or cairo version or whatever. I'm running Emacs on 
Fedora 23 x86-64, and displaying on Ubuntu 15.10 x86-64 via an ssh -X link.

If I use the current emacs-25 commit () but keep everything else the same, Emacs 
displays the binary text of the image with a message in the bottom line "Cannot 
display image: (This Emacs mishandles this image file type)", which is what I 
would expect from the current code. I don't know why I wasn't observing this 
behavior earlier, but at least now I know that Bug#22442 is still kicking.

As Mark says, Bug#22442 and Bug#21110 are probably the same bug, so I'll merge 
them. I can't recommend --with-cairo at this point.




Merged 21110 22442. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sun, 24 Jan 2016 08:52:02 GMT) Full text and rfc822 format available.

Added tag(s) help. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 03 Aug 2016 18:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22442; Package emacs. (Tue, 11 Dec 2018 02:31:02 GMT) Full text and rfc822 format available.

Message #33 received at 22442 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Paul Eggert <eggert <at> cs.ucla.edu>, 22442 <at> debbugs.gnu.org
Subject: Re: bug#22442: 25.0.50; --with-cairo does not display PNG on GNU/Linux
Date: Tue, 11 Dec 2018 04:29:57 +0200
On 23.01.2016 10:27, Paul Eggert wrote:
> wget 
> https://upload.wikimedia.org/wikipedia/commons/f/f5/All_palaeotemps.png
> emacs -Q All_palaeotemps.png

Seems to work fine now. Latest emacs-26 and master, with Cairo and 
ImageMagick.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Jul 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.