Skip to content
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

macOS: nwjs sometimes crashes on exit #44

Open
agraef opened this issue Aug 22, 2024 · 0 comments
Open

macOS: nwjs sometimes crashes on exit #44

agraef opened this issue Aug 22, 2024 · 0 comments
Assignees
Labels
bug workaround a work-around is known

Comments

@agraef
Copy link
Owner

agraef commented Aug 22, 2024

When run from the command line, you'll see an error message like the following, followed by a stack trace:

[25619:259:0817/142245.740083:ERROR:extension_function_dispatcher.cc(588)] Permission denied for nw.Obj.allocateId

These only seem to happen when exiting while some patch windows are still open (closing all windows before quitting eliminates the issue), and only if NW2 mode is disabled (which we now always do because of serious JavaScript performance issues with NW2).

Not much that can be done about this, I'm afraid, as the segfault happens in nw.js. But those crashes actually seem harmless, they happen after the application has already shut down properly. The only annoyance is that they may trigger the Mac crash reporter which will ask you whether to send a crash report to Apple. The crash reporter can be turned off, however, using these commands:

launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist

It can also be turned on again if needed:

launchctl load -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist

NB: It appears that these commands work on all recent macOS releases (tested on Ventura). There might be better ways to do this, though; if anyone knows any, please share them here, thanks!

@agraef agraef self-assigned this Aug 29, 2024
@agraef agraef added bug workaround a work-around is known labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug workaround a work-around is known
Projects
None yet
Development

No branches or pull requests

1 participant