GNU bug report logs - #46797
mac_font_shape EXC_BAD_ACCESS

Previous Next

Package: emacs;

Reported by: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Fri, 26 Feb 2021 16:31:02 UTC

Severity: normal

Tags: moreinfo

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 46797 in the body.
You can then email your comments to 46797 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#46797; Package emacs. (Fri, 26 Feb 2021 16:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 26 Feb 2021 16:31:02 GMT) Full text and rfc822 format available.

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

From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: mac_font_shape EXC_BAD_ACCESS
Date: Fri, 26 Feb 2021 16:30:13 +0000
Emacs crash on the NSPort of emacs27 HEAD, here's the LLDB info:

Process 94921 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
    frame #0: 0x00000001003abd3a
Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
macfont.m:3754:34
   3751               struct mac_glyph_layout *gl =
   3752                 glbuf + range.location + range.length;
   3753
-> 3754               if (gl->comp_range.length
   3755                   > comp_range.location + comp_range.length)
   3756                 comp_range.length = gl->comp_range.length -
comp_range.location;
   3757               min_location = gl->comp_range.location;
Target 0: (Emacs) stopped.
(lldb) bt --all
error: bt [<digit> | all]
(lldb) bt all
* thread #1, queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
  * frame #0: 0x00000001003abd3a
Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
macfont.m:3754:34
    frame #1: 0x00000001003a529e
Emacs`macfont_shape(lgstring=0x0000000106e2f005,
direction=0x0000000000000000) at macfont.m:3000:16
  thread #4, name = 'gmain'
    frame #0: 0x00007fff203211fe libsystem_kernel.dylib`__select + 10
    frame #1: 0x0000000101f4cbef libglib-2.0.0.dylib`g_poll + 505
    frame #2: 0x0000000101f40a3e
libglib-2.0.0.dylib`g_main_context_iterate + 340
    frame #3: 0x0000000101f40aec
libglib-2.0.0.dylib`g_main_context_iteration + 55
    frame #4: 0x0000000101f41b99 libglib-2.0.0.dylib`glib_worker_main + 30
    frame #5: 0x0000000101f620bd libglib-2.0.0.dylib`g_thread_proxy + 90
    frame #6: 0x00007fff2034d950 libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff2034947b libsystem_pthread.dylib`thread_start + 15
  thread #7
    frame #0: 0x00007fff203211fe libsystem_kernel.dylib`__select + 10
    frame #1: 0x000000010036dd4d Emacs`-[EmacsApp
fd_handler:](self=0x000000010532b7f0, _cmd="fd_handler:",
unused=0x0000000000000000) at nsterm.m:6066:20
    frame #2: 0x00007fff211c9e1d Foundation`__NSThread__start__ + 1042
    frame #3: 0x00007fff2034d950 libsystem_pthread.dylib`_pthread_start + 224
    frame #4: 0x00007fff2034947b libsystem_pthread.dylib`thread_start + 15
  thread #9, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff20318e7e libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff203191f0 libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff20445bf7 CoreFoundation`__CFRunLoopServiceMachPort + 316
    frame #3: 0x00007fff204442ca CoreFoundation`__CFRunLoopRun + 1315
    frame #4: 0x00007fff204436ce CoreFoundation`CFRunLoopRunSpecific + 563
    frame #5: 0x00007fff22de97c6 AppKit`_NSEventThread + 124
    frame #6: 0x00007fff2034d950 libsystem_pthread.dylib`_pthread_start + 224
    frame #7: 0x00007fff2034947b libsystem_pthread.dylib`thread_start + 15
  thread #293
    frame #0: 0x00007fff2031a53e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x0019a19a00004000
    frame #2: 0x00007fff20349467 libsystem_pthread.dylib`start_wqthread + 15
(lldb) vars
error: 'vars' is not a valid command.
(lldb) var
(CTFontRef) font = 0x000000011fb480c0
(CFStringRef) string = 0x0000000110d6b1c0 @"𝆺𝅥𝅯𝉂\0\0\0\0"
(mac_glyph_layout *) glyph_layouts = 0x00007ffeefbe9a50
(CFIndex) glyph_len = 8
(lgstring_direction) dir = DIR_UNKNOWN
(CFIndex) used = 4
(CFIndex) result = 0
(CTLineRef) ctline = 0x00000001242fa0a0
(CFArrayRef) ctruns = 0x0000000110da2e10 @"2 elements"
(CFIndex) k = 0
(CFIndex) ctrun_count = 2
(CGFloat) total_advance = 0
(CFIndex) total_glyph_count = 0
(CTRunRef) ctrun = 0x00000001242f9d00
(CFIndex) i = 14
(CFIndex) min_location = 8458716092896928869
(CFIndex) glyph_count = 1
(mac_glyph_layout *) glbuf = 0x00007ffeefbe9a50
(CFRange) string_range = location=0 length=2
(CFRange) comp_range = location=9223372036854775807 length=0
(CFRange) range = location=1142 length=493
(CFIndex *) permutation = 0x0000000000000000
(mac_glyph_layout *) gl = 0x00007ffeefbffff8


Jimmy Yuen Ho Wong




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46797; Package emacs. (Fri, 26 Feb 2021 19:04:02 GMT) Full text and rfc822 format available.

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

From: Alan Third <alan <at> idiocy.org>
To: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
Cc: 46797 <at> debbugs.gnu.org
Subject: Re: bug#46797: mac_font_shape EXC_BAD_ACCESS
Date: Fri, 26 Feb 2021 19:03:41 +0000
On Fri, Feb 26, 2021 at 04:30:13PM +0000, Jimmy Yuen Ho Wong wrote:
> Emacs crash on the NSPort of emacs27 HEAD, here's the LLDB info:
> 
> Process 94921 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason =
> EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
>     frame #0: 0x00000001003abd3a
> Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
> glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
> macfont.m:3754:34
>    3751               struct mac_glyph_layout *gl =
>    3752                 glbuf + range.location + range.length;
>    3753
> -> 3754               if (gl->comp_range.length
>    3755                   > comp_range.location + comp_range.length)
>    3756                 comp_range.length = gl->comp_range.length -
> comp_range.location;
>    3757               min_location = gl->comp_range.location;
> Target 0: (Emacs) stopped.
> (lldb) bt --all
> error: bt [<digit> | all]
> (lldb) bt all
> * thread #1, queue = 'com.apple.main-thread', stop reason =
> EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
>   * frame #0: 0x00000001003abd3a
> Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
> glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
> macfont.m:3754:34
>     frame #1: 0x00000001003a529e
> Emacs`macfont_shape(lgstring=0x0000000106e2f005,
> direction=0x0000000000000000) at macfont.m:3000:16

The interesting bit here is missing.

Can you repeat the crash and give us a recipe?
-- 
Alan Third




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 27 Feb 2021 05:05:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46797; Package emacs. (Sat, 27 Feb 2021 05:09:02 GMT) Full text and rfc822 format available.

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

From: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>, Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>,
 46797 <at> debbugs.gnu.org
Subject: Re: bug#46797: mac_font_shape EXC_BAD_ACCESS
Date: Sat, 27 Feb 2021 05:07:31 +0000
All I did was type really fast under emacs-lisp-mode that has company
and company-box setup, I just typed faster than company was able to
show me a completion menu.

Like many emacs crashes and hangs, I have no way of reproducing them
consistently. Given there's not even an lldbinit written, I can't even
debug it effectively. All I can do is run emacs compiled with
debugging information under lldb.

Jimmy

On Fri, Feb 26, 2021 at 7:03 PM Alan Third <alan <at> idiocy.org> wrote:
>
> On Fri, Feb 26, 2021 at 04:30:13PM +0000, Jimmy Yuen Ho Wong wrote:
> > Emacs crash on the NSPort of emacs27 HEAD, here's the LLDB info:
> >
> > Process 94921 stopped
> > * thread #1, queue = 'com.apple.main-thread', stop reason =
> > EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
> >     frame #0: 0x00000001003abd3a
> > Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
> > glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
> > macfont.m:3754:34
> >    3751               struct mac_glyph_layout *gl =
> >    3752                 glbuf + range.location + range.length;
> >    3753
> > -> 3754               if (gl->comp_range.length
> >    3755                   > comp_range.location + comp_range.length)
> >    3756                 comp_range.length = gl->comp_range.length -
> > comp_range.location;
> >    3757               min_location = gl->comp_range.location;
> > Target 0: (Emacs) stopped.
> > (lldb) bt --all
> > error: bt [<digit> | all]
> > (lldb) bt all
> > * thread #1, queue = 'com.apple.main-thread', stop reason =
> > EXC_BAD_ACCESS (code=1, address=0x7ffeefc00000)
> >   * frame #0: 0x00000001003abd3a
> > Emacs`mac_font_shape(font=0x000000011fb480c0, string=@"𝆺𝅥𝅯𝉂\0\0\0\0",
> > glyph_layouts=0x00007ffeefbe9a50, glyph_len=8, dir=DIR_UNKNOWN) at
> > macfont.m:3754:34
> >     frame #1: 0x00000001003a529e
> > Emacs`macfont_shape(lgstring=0x0000000106e2f005,
> > direction=0x0000000000000000) at macfont.m:3000:16
>
> The interesting bit here is missing.
>
> Can you repeat the crash and give us a recipe?
> --
> Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46797; Package emacs. (Thu, 13 May 2021 11:54:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Jimmy Yuen Ho Wong <wyuenho <at> gmail.com>
Cc: Alan Third <alan <at> idiocy.org>, 46797 <at> debbugs.gnu.org
Subject: Re: bug#46797: mac_font_shape EXC_BAD_ACCESS
Date: Thu, 13 May 2021 13:53:01 +0200
Jimmy Yuen Ho Wong <wyuenho <at> gmail.com> writes:

> All I did was type really fast under emacs-lisp-mode that has company
> and company-box setup, I just typed faster than company was able to
> show me a completion menu.
>
> Like many emacs crashes and hangs, I have no way of reproducing them
> consistently. Given there's not even an lldbinit written, I can't even
> debug it effectively. All I can do is run emacs compiled with
> debugging information under lldb.

This was ten weeks ago, so I guess it's unlikely that there'll be
further progress on this bug report, and I'm closing it.  If further
progress can be made, please respond to the debbugs address and we'll
reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 46797 <at> debbugs.gnu.org and Jimmy Yuen Ho Wong <wyuenho <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 May 2021 11:54: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, 11 Jun 2021 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 317 days ago.

Previous Next


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