From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#30800: 26.0.91; unknown crash on macos Date: Sat, 24 Mar 2018 14:12:29 +0000 Message-ID: <20180324141229.GA42512@breton.holly.idiocy.org> References: <83fu4tjmdv.fsf@gnu.org> <20180321191903.GA38993@breton.holly.idiocy.org> <83d0zxjk5p.fsf@gnu.org> <20180321201234.GA39094@breton.holly.idiocy.org> <834ll8k1tx.fsf@gnu.org> <83po3whzln.fsf@gnu.org> <20180323195210.GA41757@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1521911139 29368 195.159.176.226 (24 Mar 2018 17:05:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Mar 2018 17:05:39 +0000 (UTC) User-Agent: Mutt/1.9.3 (2018-01-21) Cc: 30800@debbugs.gnu.org, aaronjensen@gmail.com To: "Charles A. Roelli" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 24 18:05:35 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezmbk-0007Tj-1C for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Mar 2018 18:05:32 +0100 Original-Received: from localhost ([::1]:46095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezmdn-0007IV-DM for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Mar 2018 13:07:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ezmcZ-0006nO-Uq for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 13:07:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezmTg-0007wf-H7 for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 13:01:23 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43496) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezjun-0007fQ-Ph for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 10:13:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ezjun-0008S2-Jt for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 10:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Mar 2018 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30800-submit@debbugs.gnu.org id=B30800.152190076132460 (code B ref 30800); Sat, 24 Mar 2018 14:13:01 +0000 Original-Received: (at 30800) by debbugs.gnu.org; 24 Mar 2018 14:12:41 +0000 Original-Received: from localhost ([127.0.0.1]:51393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezjuS-0008RT-RE for submit@debbugs.gnu.org; Sat, 24 Mar 2018 10:12:41 -0400 Original-Received: from mail-wm0-f51.google.com ([74.125.82.51]:36288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezjuQ-0008RH-OJ for 30800@debbugs.gnu.org; Sat, 24 Mar 2018 10:12:39 -0400 Original-Received: by mail-wm0-f51.google.com with SMTP id x82so8112343wmg.1 for <30800@debbugs.gnu.org>; Sat, 24 Mar 2018 07:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=sZMrGG4VwqX8+HK8JzCYsqQST9b0nt4vguBLmj/G2Vs=; b=OIobRSGALVy2FYFfBaXWiEmglUzEccpqJZKCOHj4FPGtZG+Hc3YtYUDIM1RlLOqSi3 DIoKjwyiv2EsTqoVqp0AFUlzxZHpb1wM79p8RXzVEMEB+CHdBLqmOF4omXHoRtVEvCB6 L6fsMgpwKiCmJLOiduTer0oKBUGm/6dhW79J1lo2PVWimS+winLCGmMo4xFvXMbSAWo2 O+A+QrrIrutMA/nBPyyP9uOyTaQ4C9ITyseQPqJKwINsqgb97RwjaqtJsGLHYvNQVnwx 1TPRvz/5fG18OhjUWLy7tAM3ZGgBNjO7974+56UUng49A6JEyJjrXihyKtsnmnMcGRpL jCQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=sZMrGG4VwqX8+HK8JzCYsqQST9b0nt4vguBLmj/G2Vs=; b=BqEha2cFM4kGIoki6wILuuxisFWD5zxiM/xWaCFcdyvLAnGDBG0cYdiYrc91PrMo9L hlmisbx86TrKu84RiOCelkwQAb1+v1iYgU2qCadWEVRoj0U/sgKWczWr2dPJWsHR1IZv TwUMSD/4ogFf38Gwd3Db7Mar5osqBfXHtjXybL64WnCZJpU2vo7coD4G/xIgMkzV7e5Y Vcj4L4pcY/5A98UlaI+jmSNY0Cn114HVGWLe/3Cg4F3EvoVLdUGZDM9SQxfI3WwaFjHP lyssbmw+2ViyoaHW+I4jxIoGIrZEWSrLyRdJewtSMbBAEm5LOTBjh1w3nKqjaIQrUJa9 TNYw== X-Gm-Message-State: AElRT7Fe2TJ9uU3Iw0tuAyz6gbcoxJTmukCYQunIB1oJjx4iITfGbmj6 UEQBg3vBEopugByMjqkdbrU= X-Google-Smtp-Source: AG47ELubX/SnVUiIQnErxxLNwrN0tLnsXBxcYpKn9hOFDlFpovhaw+a5B18ins30dcWkLe7kRYJSiw== X-Received: by 10.28.113.15 with SMTP id m15mr11930645wmc.92.1521900753076; Sat, 24 Mar 2018 07:12:33 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-49b4-4ffa-851a-8ed8.holly.idiocy.org. [2001:8b0:3f8:8129:49b4:4ffa:851a:8ed8]) by smtp.gmail.com with ESMTPSA id x18sm10799298wmc.2.2018.03.24.07.12.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Mar 2018 07:12:31 -0700 (PDT) Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: 0.5 (/) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144577 Archived-At: --huq684BweRXVnRxX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Mar 24, 2018 at 11:49:43AM +0100, Charles A. Roelli wrote: > > Date: Fri, 23 Mar 2018 19:52:10 +0000 > > From: Alan Third > > > > I would like to revert it if only simplify the code, but I don’t feel > > that strongly. It may have been fixed in later releases of 10.10. It > > would be nice if someone using 10.10 could check, but I don’t know who > > could do that. > > What would you like to check? I have a partition with 10.10. Hi Charles, thanks for offering to check this. I’ve attached a patch for the emacs-26 branch that reverts d9d383147219f8e6a90d4c177e1b454e19acfac9. It doesn’t revert cleanly, hence the patch. You could try reverting it on master if you want, but I suspect it will be harder to do. Once that’s applied try the reproduction steps in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18757#41 Basically the code in question has at least one reproducible bug and looks as though it should have several more that we haven’t seen yet, and although we have a work‐around we’re wondering if we can just get rid of it completely as it appears to have been a work‐around for a bug introduced in macOS 10.10 and fixed some time later, hopefully before 10.10 stopped getting fixes. -- Alan Third --huq684BweRXVnRxX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-Revert-More-flicker-fixes-for-OSX-related-to-bug-187.patch" Content-Transfer-Encoding: 8bit >From 0e7da51a70ab7ea0dace246919a575890a061908 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 24 Mar 2018 13:50:17 +0000 Subject: [PATCH] Revert "More flicker fixes for OSX, related to bug 18757." This reverts commit d9d383147219f8e6a90d4c177e1b454e19acfac9. --- src/ChangeLog.13 | 2 +- src/nsfns.m | 9 ++++++++- src/nsterm.h | 6 +++--- src/nsterm.m | 29 +---------------------------- 4 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/ChangeLog.13 b/src/ChangeLog.13 index 31e01306a0..eddf85a367 100644 --- a/src/ChangeLog.13 +++ b/src/ChangeLog.13 @@ -13,7 +13,7 @@ outside of this function (Bug#16737). (set_property_change_object): New function. -2015-04-03 Jan Djrv +2014-11-27 Eli Zaretskii * xterm.c (handle_one_xevent): Always redraw tool tips on MapNotify. Update tool tip frame sizes on ConfigureNotify. diff --git a/src/nsfns.m b/src/nsfns.m index 7f2f060dda..83b5fc9541 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -578,11 +578,18 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)]; if (fstr == nil) fstr = @""; +#ifdef NS_IMPL_COCOA + /* work around a bug observed on 10.3 and later where + setTitleWithRepresentedFilename does not clear out previous state + if given filename does not exist */ + if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) + [[view window] setRepresentedFilename: @""]; +#endif } else fstr = @""; - ns_set_represented_filename (fstr, f); + [[view window] setRepresentedFilename: fstr]; [[view window] setTitle: str]; fset_name (f, name); } diff --git a/src/nsterm.h b/src/nsterm.h index 588b9fc644..2308e0a994 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1230,11 +1230,11 @@ struct input_event; extern void ns_init_events (struct input_event *); extern void ns_finish_events (void); +/* From nsterm.m, needed in nsfont.m. */ #ifdef __OBJC__ -/* Needed in nsfns.m. */ extern void -ns_set_represented_filename (NSString *fstr, struct frame *f); - +ns_draw_text_decoration (struct glyph_string *s, struct face *face, + NSColor *defaultCol, CGFloat width, CGFloat x); #endif #ifdef NS_IMPL_GNUSTEP diff --git a/src/nsterm.m b/src/nsterm.m index 3d58cd5ec6..2530a86ab6 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -322,9 +322,6 @@ - (NSColor *)colorUsingDefaultColorSpace NULL, 0, 0 }; -static NSString *represented_filename = nil; -static struct frame *represented_frame = 0; - #ifdef NS_IMPL_COCOA /* * State for pending menu activation: @@ -442,13 +439,6 @@ - (NSColor *)colorUsingDefaultColorSpace ========================================================================== */ -void -ns_set_represented_filename (NSString *fstr, struct frame *f) -{ - represented_filename = [fstr retain]; - represented_frame = f; -} - void ns_init_events (struct input_event *ev) { @@ -3323,7 +3313,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. -static void +void ns_draw_text_decoration (struct glyph_string *s, struct face *face, NSColor *defaultCol, CGFloat width, CGFloat x) /* -------------------------------------------------------------------------- @@ -5443,23 +5433,6 @@ - (void)sendEvent: (NSEvent *)theEvent } #endif - if (represented_filename != nil && represented_frame) - { - NSString *fstr = represented_filename; - NSView *view = FRAME_NS_VIEW (represented_frame); -#ifdef NS_IMPL_COCOA - /* work around a bug observed on 10.3 and later where - setTitleWithRepresentedFilename does not clear out previous state - if given filename does not exist */ - if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr]) - [[view window] setRepresentedFilename: @""]; -#endif - [[view window] setRepresentedFilename: fstr]; - [represented_filename release]; - represented_filename = nil; - represented_frame = NULL; - } - if (type == NSEventTypeApplicationDefined) { switch ([theEvent data2]) -- 2.16.1 --huq684BweRXVnRxX--