GNU bug report logs - #18573
24.3.93; set-face-attribute crashes Emacs on OS X 10.9.4

Previous Next

Package: emacs;

Reported by: "enquiries <at> vsm.in" <enquiries <at> vsm.in>

Date: Sat, 27 Sep 2014 16:47:02 UTC

Severity: normal

Found in version 24.3.93

Fixed in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

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 18573 in the body.
You can then email your comments to 18573 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#18573; Package emacs. (Sat, 27 Sep 2014 16:47:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "enquiries <at> vsm.in" <enquiries <at> vsm.in>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 27 Sep 2014 16:47:03 GMT) Full text and rfc822 format available.

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

From: "enquiries <at> vsm.in" <enquiries <at> vsm.in>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.93; set-face-attribute crashes Emacs on OS X 10.9.4
Date: Sat, 27 Sep 2014 18:13:44 +0200
When launched via terminal (cli), Emacs crashes by just having this 
single line in init.el:

(set-face-attribute 'default nil :font  "Menlo-16")

Emacs does /not/ crash when launched from the Finder (same init.el)


I am using GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS 
apple-appkit-1265.21) of 2014-08-15 on builder10-9.porkrind.org on OS X 
10.9.4


Sam Ask





In GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS apple-appkit-1265.21)
 of 2014-08-15 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x e m a c s b u <tab> <backspace> <backspace> - b
u g - r e p o r t <return> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> r e
p o r t <tab> <return>

Recent messages:
Loading /Users/sam/.emacs.d/init.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
delete-backward-char: Text is read-only

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util help-fns mail-prsvr mail-utils cl gv cl-loaddefs
cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process cocoa ns
multi-tty emacs)

Memory information:
((conses 16 75113 4885)
 (symbols 48 17760 0)
 (miscs 40 78 113)
 (strings 32 10523 3551)
 (string-bytes 1 303408)
 (vectors 16 9703)
 (vector-slots 8 378700 13839)
 (floats 8 53 97)
 (intervals 56 214 0)
 (buffers 960 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Sun, 28 Sep 2014 08:45:01 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: "enquiries <at> vsm.in" <enquiries <at> vsm.in>
Cc: 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Sun, 28 Sep 2014 10:44:15 +0200
Hello.

27 sep 2014 kl. 18:13 skrev enquiries <at> vsm.in:

> 
> When launched via terminal (cli), Emacs crashes by just having this single line in init.el:
> 
> (set-face-attribute 'default nil :font  "Menlo-16")
> 
> Emacs does /not/ crash when launched from the Finder (same init.el)
> 

This seems to be a generic error in xfaces.c.  It tries to load a font without checking the type
of frame.  The type is tty, but it tries to load a font anyway, and eventually ends up in (font.c) font_pixel_size, which does:

#define FRAME_RES_Y(f)						\
  (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)

Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is

#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)

but the frame is not an NS frame, it is a tty frame, so bad things happen.
It is the same for X, but there it just happens to return a nonsense value, so the code continues without crashing, and eventually discovers that there are no font dirvers and the load font fails.

The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line 3120 where it calls
font_load_for_lface.

The code in question is not called if compiled for a tty (#ifdef:ed out), but it is called when the frame is a tty frame on a non-tty compiled Emacs.

I think these cases should be the same, i.e. font_load_for_lface not called for tty frames.

	Jan D.

> I am using GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS apple-appkit-1265.21) of 2014-08-15 on builder10-9.porkrind.org on OS X 10.9.4
> 
> 
> Sam Ask
> 
> 
> 
> 
> 
> In GNU Emacs 24.3.93.1 (x86_64-apple-darwin13.3.0, NS apple-appkit-1265.21)
> of 2014-08-15 on builder10-9.porkrind.org
> Windowing system distributor `Apple', version 10.3.1265
> Configured using:
> `configure --with-ns'
> 
> Important settings:
>  locale-coding-system: utf-8-unix
> 
> Major mode: Fundamental
> 
> Minor modes in effect:
>  tooltip-mode: t
>  electric-indent-mode: t
>  mouse-wheel-mode: t
>  tool-bar-mode: t
>  menu-bar-mode: t
>  file-name-shadow-mode: t
>  global-font-lock-mode: t
>  blink-cursor-mode: t
>  auto-composition-mode: t
>  auto-encryption-mode: t
>  auto-compression-mode: t
>  buffer-read-only: t
>  line-number-mode: t
>  transient-mark-mode: t
> 
> Recent input:
> M-x e m a c s b u <tab> <backspace> <backspace> - b
> u g - r e p o r t <return> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> <backspace>
> <backspace> <backspace> <backspace> <backspace> r e
> p o r t <tab> <return>
> 
> Recent messages:
> Loading /Users/sam/.emacs.d/init.el (source)...done
> For information about GNU Emacs and the GNU system, type C-h C-a.
> delete-backward-char: Text is read-only
> 
> Load-path shadows:
> None found.
> 
> Features:
> (shadow sort gnus-util mail-extr emacsbug message cl-macs format-spec
> rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
> rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
> ietf-drums mm-util help-fns mail-prsvr mail-utils cl gv cl-loaddefs
> cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks
> lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
> fringe tabulated-list newcomment lisp-mode prog-mode register page
> menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
> syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
> vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
> romanian slovak czech european ethiopic indian cyrillic chinese
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
> loaddefs button faces cus-face macroexp files text-properties overlay
> sha1 md5 base64 format env code-pages mule custom widget
> hashtable-print-readable backquote make-network-process cocoa ns
> multi-tty emacs)
> 
> Memory information:
> ((conses 16 75113 4885)
> (symbols 48 17760 0)
> (miscs 40 78 113)
> (strings 32 10523 3551)
> (string-bytes 1 303408)
> (vectors 16 9703)
> (vector-slots 8 378700 13839)
> (floats 8 53 97)
> (intervals 56 214 0)
> (buffers 960 12))
> 
> 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Sun, 28 Sep 2014 12:25:02 GMT) Full text and rfc822 format available.

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

From: "enquiries <at> vsm.in" <enquiries <at> vsm.in>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93; set-face-attribute crashes Emacs when started
 with -nw
Date: Sun, 28 Sep 2014 14:24:21 +0200
On 28/09/2014 10:44, Jan Djärv wrote:
> Hello.
>
> 27 sep 2014 kl. 18:13 skrev enquiries <at> vsm.in:
>
>>
>> When launched via terminal (cli), Emacs crashes by just having this single line in init.el:
>>
>> (set-face-attribute 'default nil :font  "Menlo-16")
>>
>> Emacs does /not/ crash when launched from the Finder (same init.el)
>>
>
> This seems to be a generic error in xfaces.c.  It tries to load a font without checking the type
> of frame.  The type is tty, but it tries to load a font anyway, and eventually ends up in (font.c) font_pixel_size, which does:
>
> #define FRAME_RES_Y(f)						\
>    (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
>
> Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is
>
> #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
>
> but the frame is not an NS frame, it is a tty frame, so bad things happen.
> It is the same for X, but there it just happens to return a nonsense value, so the code continues without crashing, and eventually discovers that there are no font dirvers and the load font fails.
>
> The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line 3120 where it calls
> font_load_for_lface.
>
> The code in question is not called if compiled for a tty (#ifdef:ed out), but it is called when the frame is a tty frame on a non-tty compiled Emacs.
>
> I think these cases should be the same, i.e. font_load_for_lface not called for tty frames.
>
> 	Jan D.


Hi,

Thank you, that sounds like the reason, although I am not fluent with C 
nor gdb to check and confirm it.

I can add that Emacs just crashes printing this error:

Fatal error 11: Segmentation fault[1] 51512 abort 
/Applications/Emacs.app/Contents/MacOS/Emacs -nw

Also, if that line is wrapped with condition-case err, like this:

(condition-case err (set-face-attribute 'default nil :font "Menlo-16") 
(error (message "Whoops!")))

I experience the same crash with same error message. No additional 
elisp-originating messages.


I have tried with GNU Emacs 24.3.1 (x86_64-apple-darwin, NS 
apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org, from 
emacsformacosx.com, and Emacs does not crash. So, it must be a bug in 
later versions.

I am of course aware that in any case Emacs will inherit whatever font 
and font size is specified in the terminal app (basically, that line is 
not meaningful in the cli).

Sam





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Mon, 29 Sep 2014 17:19:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Mon, 29 Sep 2014 20:18:11 +0300
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Sun, 28 Sep 2014 10:44:15 +0200
> Cc: 18573 <at> debbugs.gnu.org
> 
> This seems to be a generic error in xfaces.c.  It tries to load a font without checking the type
> of frame.  The type is tty, but it tries to load a font anyway, and eventually ends up in (font.c) font_pixel_size, which does:
> 
> #define FRAME_RES_Y(f)						\
>   (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
> 
> Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is
> 
> #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
> 
> but the frame is not an NS frame, it is a tty frame, so bad things happen.
> It is the same for X, but there it just happens to return a nonsense value, so the code continues without crashing, and eventually discovers that there are no font dirvers and the load font fails.
> 
> The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line 3120 where it calls
> font_load_for_lface.
> 
> The code in question is not called if compiled for a tty (#ifdef:ed out), but it is called when the frame is a tty frame on a non-tty compiled Emacs.
> 
> I think these cases should be the same, i.e. font_load_for_lface not called for tty frames.

I believe this happens when internal-set-lisp-face-attribute is
called with its FRAME argument t, meaning change the default for new
(i.e. future) frames.  Since the code needs a frame, it just uses the
selected frame, which in this case happens to be a TTY frame.

Is that description correct?

If so, the question is how to fix this.  If we simply do nothing when
the selected frame is a TTY frame, and then create a GUI frame at some
future point, will the new default take effect?  If it will, then I
agree that the code under this condition

	      if (! FONT_OBJECT_P (value))

should not be executed when the selected frame is a TTY frame.

But if this doesn't work, then what are our alternatives?  We could
loop over all the frames looking for a GUI frame, and use that.  But
what if there's no such frame?  Signal an error?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Mon, 29 Sep 2014 17:35:02 GMT) Full text and rfc822 format available.

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

From: "enquiries <at> vsm.in" <enquiries <at> vsm.in>
To: Eli Zaretskii <eliz <at> gnu.org>, Jan Djärv
 <jan.h.d <at> swipnet.se>
Cc: 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93; set-face-attribute crashes Emacs when started
 with -nw
Date: Mon, 29 Sep 2014 19:34:04 +0200
On 29/09/2014 19:18, Eli Zaretskii wrote:
>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Sun, 28 Sep 2014 10:44:15 +0200
>> Cc: 18573 <at> debbugs.gnu.org
>>
>> This seems to be a generic error in xfaces.c.  It tries to load a font without checking the type
>> of frame.  The type is tty, but it tries to load a font anyway, and eventually ends up in (font.c) font_pixel_size, which does:
>>
>> #define FRAME_RES_Y(f)						\
>>    (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
>>
>> Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is
>>
>> #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
>>
>> but the frame is not an NS frame, it is a tty frame, so bad things happen.
>> It is the same for X, but there it just happens to return a nonsense value, so the code continues without crashing, and eventually discovers that there are no font dirvers and the load font fails.
>>
>> The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line 3120 where it calls
>> font_load_for_lface.
>>
>> The code in question is not called if compiled for a tty (#ifdef:ed out), but it is called when the frame is a tty frame on a non-tty compiled Emacs.
>>
>> I think these cases should be the same, i.e. font_load_for_lface not called for tty frames.
>
> I believe this happens when internal-set-lisp-face-attribute is
> called with its FRAME argument t, meaning change the default for new
> (i.e. future) frames.  Since the code needs a frame, it just uses the
> selected frame, which in this case happens to be a TTY frame.
>
> Is that description correct?
>
> If so, the question is how to fix this.  If we simply do nothing when
> the selected frame is a TTY frame, and then create a GUI frame at some
> future point, will the new default take effect?  If it will, then I
> agree that the code under this condition
>
> 	      if (! FONT_OBJECT_P (value))
>
> should not be executed when the selected frame is a TTY frame.
>
> But if this doesn't work, then what are our alternatives?  We could
> loop over all the frames looking for a GUI frame, and use that.  But
> what if there's no such frame?  Signal an error?
>



That description sounds correct to me, although I have no knowledge of 
the innards of Emacs.

Signalling an error would be better than crashing of course. Still, the 
crash is not happening with prior version (GNU Emacs 24.3.1).

Sam




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 16:50:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>,  18573 <at> debbugs.gnu.org
Cc: "enquiries <at> vsm.in" <enquiries <at> vsm.in>
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 01 Oct 2014 12:49:08 -0400
"enquiries <at> vsm.in" wrote:

> I have tried with GNU Emacs 24.3.1 (x86_64-apple-darwin, NS
> apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org, from
> emacsformacosx.com, and Emacs does not crash.

So should this be fixed in emacs-24, and should the pretest wait for it?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 17:44:01 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 1 Oct 2014 19:43:11 +0200
Hi.

29 sep 2014 kl. 19:18 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Sun, 28 Sep 2014 10:44:15 +0200
>> Cc: 18573 <at> debbugs.gnu.org
>> 
>> This seems to be a generic error in xfaces.c.  It tries to load a font without checking the type
>> of frame.  The type is tty, but it tries to load a font anyway, and eventually ends up in (font.c) font_pixel_size, which does:
>> 
>> #define FRAME_RES_Y(f)						\
>>  (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
>> 
>> Now, FRAME_DISPLAY_INFO for a NS compiled Emacs is
>> 
>> #define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
>> 
>> but the frame is not an NS frame, it is a tty frame, so bad things happen.
>> It is the same for X, but there it just happens to return a nonsense value, so the code continues without crashing, and eventually discovers that there are no font dirvers and the load font fails.
>> 
>> The code is in xfaces.c, Finternal_set_lisp_face_attribute, around line 3120 where it calls
>> font_load_for_lface.
>> 
>> The code in question is not called if compiled for a tty (#ifdef:ed out), but it is called when the frame is a tty frame on a non-tty compiled Emacs.
>> 
>> I think these cases should be the same, i.e. font_load_for_lface not called for tty frames.
> 
> I believe this happens when internal-set-lisp-face-attribute is
> called with its FRAME argument t, meaning change the default for new
> (i.e. future) frames.  Since the code needs a frame, it just uses the
> selected frame, which in this case happens to be a TTY frame.
> 
> Is that description correct?

Yes.

> 
> If so, the question is how to fix this.  If we simply do nothing when
> the selected frame is a TTY frame, and then create a GUI frame at some
> future point, will the new default take effect?  If it will, then I
> agree that the code under this condition
> 
> 	      if (! FONT_OBJECT_P (value))
> 
> should not be executed when the selected frame is a TTY frame.

If this code is not run for the initial tty frame, then a GUI frame made later with make-frame-on-display does not get this font.  The face is not changed for future frames.

> 
> But if this doesn't work, then what are our alternatives?  We could
> loop over all the frames looking for a GUI frame, and use that.  But
> what if there's no such frame?  Signal an error?

There is a fundamental error here.  Emacs allows specifying face attributes for future GUI frames when only non-GUI frames exists.  But those attributes requires GUI frames to be realized.
We are missing a "lazy" realization that only saves the text version of the attribute and realizes only when an apropriate frame is available.

For now I comitted the "wont crash" solution (don't execute the code for tty frames) in the emacs 24 branch.  No error is signalled and no looping is done to find a GUI frame.  I'm not sure if we should do that.

	Jan D.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 17:50:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 01 Oct 2014 20:49:28 +0300
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Wed, 1 Oct 2014 19:43:11 +0200
> Cc: enquiries <at> vsm.in,
>  18573 <at> debbugs.gnu.org
> 
> > But if this doesn't work, then what are our alternatives?  We could
> > loop over all the frames looking for a GUI frame, and use that.  But
> > what if there's no such frame?  Signal an error?
> 
> There is a fundamental error here.  Emacs allows specifying face attributes for future GUI frames when only non-GUI frames exists.  But those attributes requires GUI frames to be realized.
> We are missing a "lazy" realization that only saves the text version of the attribute and realizes only when an apropriate frame is available.
> 
> For now I comitted the "wont crash" solution (don't execute the code for tty frames) in the emacs 24 branch.  No error is signalled and no looping is done to find a GUI frame.  I'm not sure if we should do that.

If the frame argument is t, we could try looking for a GUI frame; that
way, we would signal an error in fewer cases.  After all, using the
selected frame is arbitrary.

At the very least, I think we should have a FIXME comment there
describing the problem.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 17:56:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Jan Djärv <jan.h.d <at> swipnet.se>,
 "enquiries <at> vsm.in" <enquiries <at> vsm.in>, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 01 Oct 2014 13:55:08 -0400
>> I have tried with GNU Emacs 24.3.1 (x86_64-apple-darwin, NS
>> apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org, from
>> emacsformacosx.com, and Emacs does not crash.
> So should this be fixed in emacs-24,

Yes.

> and should the pretest wait for it?

Depends if there's an easy quick fix.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 18:12:01 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 1 Oct 2014 20:11:34 +0200
1 okt 2014 kl. 19:49 skrev Eli Zaretskii <eliz <at> gnu.org>:

> If the frame argument is t, we could try looking for a GUI frame; that
> way, we would signal an error in fewer cases.  After all, using the
> selected frame is arbitrary.
> 
> At the very least, I think we should have a FIXME comment there
> describing the problem.

I added a comment.

	Jan D.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Wed, 01 Oct 2014 18:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93;
 set-face-attribute crashes Emacs when started with -nw
Date: Wed, 01 Oct 2014 21:16:33 +0300
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Wed, 1 Oct 2014 20:11:34 +0200
> Cc: enquiries <at> vsm.in,
>  18573 <at> debbugs.gnu.org
> 
> 
> 1 okt 2014 kl. 19:49 skrev Eli Zaretskii <eliz <at> gnu.org>:
> 
> > If the frame argument is t, we could try looking for a GUI frame; that
> > way, we would signal an error in fewer cases.  After all, using the
> > selected frame is arbitrary.
> > 
> > At the very least, I think we should have a FIXME comment there
> > describing the problem.
> 
> I added a comment.

Thanks.




Severity set to 'normal' from 'important' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 01 Oct 2014 21:02:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18573; Package emacs. (Thu, 26 Sep 2019 20:58:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, enquiries <at> vsm.in, 18573 <at> debbugs.gnu.org
Subject: Re: bug#18573: 24.3.93; set-face-attribute crashes Emacs when started
 with -nw
Date: Thu, 26 Sep 2019 22:57:26 +0200
fixed 18573 24.4
close 18573
quit

Jan Djärv <jan.h.d <at> swipnet.se> writes:

> For now I comitted the "wont crash" solution (don't execute the code for tty
> frames) in the emacs 24 branch.  No error is signalled and no looping is done to
> find a GUI frame.  I'm not sure if we should do that.

I think that fixed the issue; I can no longer reproduce it.

I don't see anything else outstanding, besides the FIXME added in:

commit 335e9627ca78f7be9eea27f38a530fd51a1e6995
Author: Jan Djärv <jan.h.d <at> swipnet.se>
Date:   Wed Oct 1 20:10:21 2014 +0200

    * xfaces.c (Finternal_set_lisp_face_attribute): Added FIXME comment.

But that is just a possible improvement, and keeping this bug open won't
do much to help direct any efforts to doing that.  If anything it will
confuse it by mixing it up with a crash that has been fixed for a long
time.

I'm therefore closing this bug.  If anyone disagrees, feel free to
reopen.

Best regards,
Stefan Kangas




bug Marked as fixed in versions 24.4. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 26 Sep 2019 20:58:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18573 <at> debbugs.gnu.org and "enquiries <at> vsm.in" <enquiries <at> vsm.in> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 26 Sep 2019 20:58:02 GMT) Full text and rfc822 format available.

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

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

Previous Next


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