From: Alan Third <alan@idiocy.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: Phillip Hutchings <phillip@iontech.nz>, 38618@debbugs.gnu.org
Subject: bug#38618: 27.0.50; Mach port leak on macOS Catalina causing crash
Date: Tue, 17 Dec 2019 21:23:19 +0000 [thread overview]
Message-ID: <20191217212319.GB18094@breton.holly.idiocy.org> (raw)
In-Reply-To: <wld0cnipcc.wl-mituharu@math.s.chiba-u.ac.jp>
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
On Tue, Dec 17, 2019 at 12:49:07PM +0900, YAMAMOTO Mitsuharu wrote:
>
> The Mac port (not the NS port in your report) also has the problem of
> Mach port leaks in -[NSWindow setRepresentedURL:] on macOS 10.15. I
> think this is a bug in AppKit or some lower-level stuff. I'll file it
> to Apple later.
>
> I've installed a workaround into the "work" branch of the repository
> of the Mac port:
>
> https://bitbucket.org/mituharu/emacs-mac/commits/19c97087065b7ca64b71f392a453673042e024c6
Thank you for finding the problem!
Can someone on 10.15 try the attached patch, please?
--
Alan Third
[-- Attachment #2: 0001-Check-if-file-is-in-iCloud-drive-bug-38618.patch --]
[-- Type: text/plain, Size: 1229 bytes --]
From 001657867ee189a4b06f790eb951fcdf0f65c732 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Tue, 17 Dec 2019 21:17:46 +0000
Subject: [PATCH] Check if file is in iCloud drive (bug#38618)
* src/nsfns.m (ns_set_represented_filename): Check whether the file is
a "ubiquitous item", and if so don't display a proxy icon.
---
src/nsfns.m | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/nsfns.m b/src/nsfns.m
index 4c1fb76dea..1d3aea038a 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -490,6 +490,17 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
else
fstr = @"";
+#if defined (NS_IMPL_COCOA) && defined (MAC_OS_X_VERSION_10_7)
+ /* Work around for Mach port leaks on macOS 10.15 (bug#38618). */
+ NSURL *fileURL = [NSURL fileURLWithPath:fstr isDirectory:NO];
+ BOOL isUbiquitousItem = YES;
+ [fileURL getResourceValue:(id *)&isUbiquitousItem
+ forKey:NSURLIsUbiquitousItemKey
+ error:nil];
+ if (isUbiquitousItem)
+ fstr = @"";
+#endif
+
#ifdef NS_IMPL_COCOA
/* Work around a bug observed on 10.3 and later where
setTitleWithRepresentedFilename does not clear out previous state
--
2.24.0
next prev parent reply other threads:[~2019-12-17 21:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-15 1:35 bug#38618: 27.0.50; Mach port leak on macOS Catalina causing crash Phillip Hutchings
2019-12-15 14:48 ` Alan Third
2019-12-16 4:01 ` Phillip Hutchings
2019-12-17 3:49 ` YAMAMOTO Mitsuharu
2019-12-17 21:23 ` Alan Third [this message]
2019-12-17 21:29 ` Phillip Hutchings
2019-12-22 11:49 ` Alan Third
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191217212319.GB18094@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=38618@debbugs.gnu.org \
--cc=mituharu@math.s.chiba-u.ac.jp \
--cc=phillip@iontech.nz \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.