unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Third <alan@idiocy.org>
Cc: 22818@debbugs.gnu.org, josh@berdine.net
Subject: bug#22818: 25.1.1 Emacs.app crash ns_compute_glyph_string_overhangs
Date: Sat, 19 Nov 2016 12:27:27 +0200	[thread overview]
Message-ID: <83k2bzbw8g.fsf@gnu.org> (raw)
In-Reply-To: <20161119100703.GA66661@breton.holly.idiocy.org> (message from Alan Third on Sat, 19 Nov 2016 10:07:03 +0000)

> Date: Sat, 19 Nov 2016 10:07:03 +0000
> From: Alan Third <alan@idiocy.org>
> Cc: Josh Berdine <josh@berdine.net>, 22818@debbugs.gnu.org
> 
> On Sat, Nov 19, 2016 at 09:07:50AM +0200, Eli Zaretskii wrote:
> > Can you convert the address in frame #0 into line numbers?  Judging by
> > the faulting address, 0xd0, some pointer in
> > ns_compute_glyph_string_overhangs is a null pointer, but it's hard to
> > tell which one without the line number information.
> 
> I finally managed to replicate this on my own build:
> 
> (lldb) run -Q ~/test-file
> Process 66588 launched: '/Users/alan/src/emacs/emacs-25/nextstep/Emacs.app/Contents/MacOS/Emacs' (x86_64)
> Process 66588 stopped
> * thread #1: tid = 0x154600, 0x00000001002c0940 Emacs`ns_compute_glyph_string_overhangs(s=0x00007fff5fbfb6f0) + 224 at nsterm.m:2681, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xd0)
>     frame #0: 0x00000001002c0940 Emacs`ns_compute_glyph_string_overhangs(s=0x00007fff5fbfb6f0) + 224 at nsterm.m:2681
>    2678	  else
>    2679	    {
>    2680	      s->left_overhang = 0;
> -> 2681	      if (EQ (font->driver->type, Qns))
>    2682	        s->right_overhang = ((struct nsfont_info *)font)->ital ?
>    2683	          FONT_HEIGHT (font) * 0.2 : 0;
>    2684	      else
> (lldb) bt all
> * thread #1: tid = 0x154600, 0x00000001002c0940 Emacs`ns_compute_glyph_string_overhangs(s=0x00007fff5fbfb6f0) + 224 at nsterm.m:2681, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xd0)
>   * frame #0: 0x00000001002c0940 Emacs`ns_compute_glyph_string_overhangs(s=0x00007fff5fbfb6f0) + 224 at nsterm.m:2681
>     frame #1: 0x0000000100058e7c Emacs`draw_glyphs(w=0x000000010204f430, x=570, row=0x000000010240e100, area=TEXT_AREA, start=0, end=52, hl=DRAW_NORMAL_TEXT, overlaps=0) + 3324 at xdisp.c:25673

So the question now becomes: how did that glyph_string got a NULL
font?  The answer is somewhere in the code that generates glyph
strings as part of the call to BUILD_GLYPH_STRINGS.  Can you try
figuring out why does that happen, by stepping through the code in
BUILD_GLYPH_STRINGS?

> (lldb) frame variable
> (glyph_string *) s = 0x00007fff5fbfb6f0
> (font *) font = 0x0000000000000000
> 
> (lldb) frame variable *s
> (glyph_string) *s = {
>   x = 10
>   y = 16
>   ybase = 30
>   width = 11
>   background_width = 11
>   height = 20
>   left_overhang = 0
>   right_overhang = 0
>   f = 0x0000000102050430
>   w = 0x000000010204f430
>   display = 0x0000000000000000
>   window = 1
>   row = 0x000000010240e100
>   area = TEXT_AREA
>   char2b = 0x0000000000000000
>   nchars = 1
>   hl = DRAW_NORMAL_TEXT
>   face = 0x000000010153b400

What kind of face is s->face?

Thanks.





  reply	other threads:[~2016-11-19 10:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 13:41 bug#22818: 25.0.91; nextstep/Emacs.app Crash ns_compute_glyph_string_overhangs Aaron S. Hawley
2016-05-18 20:07 ` Alan Third
2016-05-18 21:09   ` Aaron S. Hawley
2016-11-18 21:31 ` bug#22818: 25.1.1 Emacs.app crash ns_compute_glyph_string_overhangs Josh Berdine
2016-11-19  7:07   ` Eli Zaretskii
2016-11-19 10:07     ` Alan Third
2016-11-19 10:27       ` Eli Zaretskii [this message]
2016-11-19 11:18         ` Alan Third
2016-11-19 11:43           ` Eli Zaretskii
2016-11-19 14:53             ` Alan Third
2016-11-19 15:09               ` Eli Zaretskii
2016-11-19 15:51                 ` Alan Third
2016-11-19 18:12                   ` Eli Zaretskii
2016-11-19 19:05                     ` Alan Third
2016-11-19 19:27                       ` Eli Zaretskii
2016-11-19 19:38                         ` Alan Third
2022-04-18 11:32 ` bug#22818: 25.0.91; nextstep/Emacs.app Crash ns_compute_glyph_string_overhangs Lars Ingebrigtsen
2022-04-18 11:44   ` Aaron S. Hawley
2022-04-18 11:45     ` Lars Ingebrigtsen

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=83k2bzbw8g.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22818@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=josh@berdine.net \
    /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).