-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious layout warning at startup #123
Comments
The x86_64 version of emacs is configured with:
I kind of doubt the What MacOS version are you running? Currently the x86_64 binary is build on 10.11 and 10.14 (the launcher checks your os version and launches the most recent one that isn't ahead of you). Interestingly, I don't get that particular message when I run on my machine (aarch64), but I get a different one instead. |
This laptop (owned by my primary client) is running 12.5.1 on x86_64. On my own MacBook, running 12.5.1 on M1, the same version of Emacs (installed with the identical Can you tell me how you code-sign the executables? And do you know what I would need to do in order to get the debugger to be able to attach to the program? |
Taking a little detour, I tried a stab in the dark with the theory that perhaps I would be able to use the
|
That error is caused by the |
Back to the ultimate goal: do you know if there's something I can do to the executable installed by https://emacsformacosx.com/ to make it attachable by the debugger? |
Sadly I don't. I think it has to do with the hardened executable stuff that needs to be there for notarization to work, but I don't know how to strip it or bypass it. It's possible that bypassing Gatekeeper (requires a reboot) might let it work. |
The code signing and notarization code is all in |
It's starting to look like I can build a program I can debug (but which doesn't exhibit the behavior I'm being asked to debug) or I can install a pre-built program which exhibits the unwanted behavior (but can't be debugged) but I can't create a build of the program which will let me debug the code which is emitting the warning. Oh, well, I'm still better off than when I started, with a build which behaves the way I want it to. I'll just have to live with the fact that I can't give the Emacs team the stack trace they were hoping for. Thanks for your help anyway. |
I was able to reproduce this on another Intel MacBook, on which I reformatted the hard disk and reinstalled Mac OS (Monterey). The only third-party application I installed was the current build of Emacs from https://emacsformacosx.com. I launched the program from the terminal and got the spurious warning. So we know that if I run Emacs with the Rust launcher I see the problem, and if I build Emacs using the |
I noticed that this bug was first reported in January of this year, which is when the switch to the Rust loader happened (or at least, the |
You can test whether the launcher is involved by launching the binary directly. It's probably one of:
The launcher binary sits at I kinda doubt it's the launcher—it only interacts with Cocoa apis if there is an error that it needs to show to the user with a dialog. In the normal working operations it shouldn't be hitting any apis that could print that message. That said, it could be related to the way the launcher execs the main binary, so it's certainly worth ruling out (and with software, anything's possible!). |
You're right—I can reproduce the bug by running Emacs-x86_64-10_14 directly. So that does indeed rule out the launcher (and it was in fact a coincidence that the switch to the Rust loader coincided with the first reports of this bug). What we know:
What we (or at least I) don't know:
I'll see if I can determine the answer to the first question (if you don't already know) by trying to get a MacBook to install an older version of MacOS. And I suppose that if nothing else I'll find out the answer to the second question when https://emacsformacosx.com/ hosts Intel builds targeted for MacOS 11 or 12. |
It seems that Apple is not interested in letting me install an older version of macOS. I tried following instructions on a MacWorld page, but every time I tried the download got to the end and then displayed "Installation failed. An error occurred while installing the selected updates" (even though the instructions I was following were for downloading an installer which could be put onto removable media). So unless you know of users who are running your emacs on the older macOS I probably won't ever know the answer to the first of the two questions in the previous comment. 🤷♂️ |
When emacs is launched from the terminal a message is displayed complaining of illegal calls and warning that something may break in the future.
Emacs has been installed by
brew install --cask emacs
which uses builds hosted by https://emacsformacosx.com/. I tried usingbrew
to install the latest nightly build from the same source, but still got the unwanted message at launch time.I reported the unwanted behavior to the Emacs team, and I was asked to load Emacs in the debugger and run it with a breakpoint at
_NSDetectedLayoutRecursion
and provide the backtrace, but that attempt failed with the error message "Not allowed to attach to process." The Emacs for Mac OS X site links to this repository as the source for the scripts used to build the artifacts. So I tried using these scripts to build an Emacs I could debug, but the result does not exhibit the unwanted behavior. So I've been asked to inquire here to find out what options are used in building the artifacts installed byhomebrew
.The text was updated successfully, but these errors were encountered: