[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs crashes when displaying the Euro character
From: |
Chong Yidong |
Subject: |
Re: Emacs crashes when displaying the Euro character |
Date: |
Sat, 02 Sep 2006 23:35:35 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> How about a solution that I
> suggested some time ago, of simply ignoring non-fatal X errors (as
> recommended in the X manual)? No one responded to this thread.
>
> That would avoid the crashes. My concern is that it would also
> avoid the debugging of all such problems in the future.
>
> Perhaps we should ignore BadName errors only. It is possible that
> such errors, in the context of Emacs, are always unimportant, and that
> there will be no particular need to debug what causes them, once Emacs
> ignores them. Could someone check an X manual and see if this is
> true.
The Xlib manual simply says that
These [X protocol] errors generally are reflected back to the
program through the procedural interface. Because this condition is
not assumed to be fatal, it is acceptable for your error handler to
return; the returned value is ignored. However, the error handler
should not call any functions (directly or indirectly) on the
display that will generate protocol requests or that will look for
input events.
The BadName error code is defined as
A font or color of the specified name does not exist.
The manual entry for XDrawImageString16 says that it can signal
several different protocol errors:
BadDrawable A value for a Drawable argument does not name a defined
Window or Pixmap.
BadGC A value for a GContext argument does not name a defined
GContext.
BadMatch An InputOnly window is used as a Drawable.
BadMatch Some argument or pair of arguments has the correct type and
range but fails to match in some other way required by the request.
(Strangely, BadName isn't one of these; this may be a documentation
error.)
In any case, I don't think it's worth it to treat BadName specially.
> Another idea occurs to me: make these errors display a warning in a
> buffer using `display-warning'. This might be a way to avoid the
> crash without just forgetting these errors.
This is not straightforward to implement, since X errors can occur
inside a signal handler.
How about simply printing the error message to stderr?
Re: Emacs crashes when displaying the Euro character, Milan Zamazal, 2006/09/04