unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <jmbarranquero@wke.es>
Cc: Andreas Schwab <schwab@suse.de>, David Kastrup <dak@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: [PATCH] Delayed loading of image libraries
Date: Fri, 02 Jul 2004 10:10:56 +0200	[thread overview]
Message-ID: <20040702095920.CF37.JMBARRANQUERO@wke.es> (raw)
In-Reply-To: <buosmcaalks.fsf@mctpc71.ucom.lsi.nec.co.jp>


On Fri, 02 Jul 2004 16:56:51 +0900
Miles Bader <miles@lsi.nec.co.jp> wrote:

> I have no particular opinion about which exact function does it, but it
> _should_ be done `transparently' -- that is any place where a lisp value
> is used to compute deeper information (for display or otherwise).

If it is done transparently, what to do when the image type is not
available?  You're worried about the case where you write an image and
load it afterwards on the same Emacs, but in the general case, you can
write an (image) lisp value with one Emacs and load it with another
(which could not support the type).  What's the expected behaviour at
that point?

If my reading of the code is right, when lookup_image_type returns NULL
anything can happen.  The code has a few xasserts here and there, but
there's no real handling of NULL image types.  Vide the current
situation: when you try to load a TIFF, lookup_image_type returns NULL 
(because init-image-library is getting a null alist, but that's
irrelevant to the argument).  At some point, this return value is not
checked and bingo!  Emacs crashes (at least on Windows).

> Both of those call `lookup_image_type', and thus
> my placing a call to image-type-validation there.
> 
> If I omitted an argument, obviously my change was flawed, but the
> location seems reasonable.

Perhaps you're right, I don't know.  If you are right, then
lookup_image_type would have to make sure that init-image-library is
using image-library-alist, at which point the use of that variable is
fixed in C code, and in fact no longer makes sense to pass it as an
argument to init-image-library (it could as well be directly used from
inside the function, as it is no longer overridable by the user).

                                                                Juanma

  reply	other threads:[~2004-07-02  8:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-10 12:38 [PATCH] Delayed loading of image libraries Juanma Barranquero
2004-06-30 10:15 ` Andreas Schwab
2004-06-30 11:13   ` Juanma Barranquero
2004-06-30 11:24     ` Andreas Schwab
2004-06-30 11:34       ` Juanma Barranquero
2004-06-30 11:41         ` Andreas Schwab
2004-06-30 13:00           ` Juanma Barranquero
2004-06-30 15:42         ` Miles Bader
2004-07-01  9:30           ` Juanma Barranquero
2004-07-01  9:48             ` Miles Bader
2004-07-01 10:13               ` Juanma Barranquero
2004-07-02  1:16                 ` Miles Bader
2004-07-02  7:02                   ` Juanma Barranquero
2004-07-02  7:10                     ` David Kastrup
2004-07-02  7:41                       ` Juanma Barranquero
2004-07-02  7:56                         ` Miles Bader
2004-07-02  8:10                           ` Juanma Barranquero [this message]
2004-07-02  8:20                             ` Miles Bader
2004-07-02  8:45                               ` Juanma Barranquero
2004-07-02  8:59                                 ` Miles Bader
2004-07-02  9:02                                   ` Miles Bader
2004-07-02  8:11                         ` David Kastrup
2004-07-02  8:34                           ` Juanma Barranquero
2004-07-03 18:21                     ` Richard Stallman
2004-06-30 14:19       ` Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040702095920.CF37.JMBARRANQUERO@wke.es \
    --to=jmbarranquero@wke.es \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).