GNU bug report logs -
#65817
30.0.50; Abort with NSInvalidArgumentException on macOS Big Sur
Previous Next
Full log
Message #11 received at 65817 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Sep 08, 2023 at 09:01:06AM +0200, Gerd Möllmann wrote:
> System Description: macOS 11.7.9
>
> This is a 10 year old Mac. I can't reproduce it at will. Below is what
> was printed to the terminal, then Emacs aborted.
This is odd. The system is trying to draw the frame to the screen
*long* before we've finished creating it.
I don't know why this would be happening, it's possible that we've hit
an edge case where we accidentally mark the view for display early,
but I don't know how we would be doing that.
> 5 emacs 0x000000010033d481 -[EmacsView lockFocus] + 49
> 6 emacs 0x000000010032ee27 ns_focus + 87
> 7 emacs 0x000000010033df80 ns_clear_frame_area + 400
> 8 emacs 0x000000010033dda1 -[EmacsView drawRect:] + 321
<snip>
> 21 AppKit 0x00007fff2314c06f -[NSWindow addChildWindow:ordered:] + 640
> 22 emacs 0x000000010033fe08 -[EmacsWindow setParentChildRelationships] + 696
> 23 emacs 0x000000010033f2ad -[EmacsWindow initWithEmacsFrame:fullscreen:screen:] + 1485
> 24 emacs 0x000000010033ecd0 -[EmacsWindow initWithEmacsFrame:] + 48
> 25 emacs 0x000000010033ace5 -[EmacsView initFrameFromEmacs:] + 1045
> 26 emacs 0x00000001003579a1 Fx_create_frame + 7937
At the point lockFocus is called here, we haven't yet set up the layer
we want to draw into. I can't find any indication that addChildWindow
may trigger a display, but this is Apple's documentation I'm talking
about...
I've attached a patch that reorders some of the initialisation,
hopefully avoiding this problem.
I've also attached another patch that you may need to apply first to
make the second one apply cleanly.
--
Alan Third
[v2-0001-Simplify-the-EmacsLayer-double-buffering-code-bug.patch (text/x-diff, attachment)]
[0001-Fix-crash-on-child-frame-creation-bug-65817.patch (text/x-diff, attachment)]
This bug report was last modified 1 year and 255 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.