From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30800: 26.0.91; unknown crash on macos Date: Wed, 21 Mar 2018 21:36:18 +0200 Message-ID: <83d0zxjk5p.fsf@gnu.org> References: <83muz1jrdv.fsf@gnu.org> <83k1u5jqxm.fsf@gnu.org> <83in9pjnkc.fsf@gnu.org> <83fu4tjmdv.fsf@gnu.org> <20180321191903.GA38993@breton.holly.idiocy.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1521660910 13431 195.159.176.226 (21 Mar 2018 19:35:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2018 19:35:10 +0000 (UTC) Cc: 30800@debbugs.gnu.org, aaronjensen@gmail.com To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 21 20:35:05 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 1eyjVp-0003NM-8g for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Mar 2018 20:35:05 +0100 Original-Received: from localhost ([::1]:56973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyjXs-0005rI-Fm for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Mar 2018 15:37:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyjXm-0005r8-HE for bug-gnu-emacs@gnu.org; Wed, 21 Mar 2018 15:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyjXi-0005oY-IZ for bug-gnu-emacs@gnu.org; Wed, 21 Mar 2018 15:37:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eyjXi-0005oR-FP for bug-gnu-emacs@gnu.org; Wed, 21 Mar 2018 15:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eyjXi-00085x-86 for bug-gnu-emacs@gnu.org; Wed, 21 Mar 2018 15:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Mar 2018 19:37:02 +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.152166099231081 (code B ref 30800); Wed, 21 Mar 2018 19:37:02 +0000 Original-Received: (at 30800) by debbugs.gnu.org; 21 Mar 2018 19:36:32 +0000 Original-Received: from localhost ([127.0.0.1]:46255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eyjXE-00085F-GF for submit@debbugs.gnu.org; Wed, 21 Mar 2018 15:36:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eyjXD-000853-4T for 30800@debbugs.gnu.org; Wed, 21 Mar 2018 15:36:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyjX3-0005Vj-Ts for 30800@debbugs.gnu.org; Wed, 21 Mar 2018 15:36:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyjX3-0005Vd-Qb; Wed, 21 Mar 2018 15:36:21 -0400 Original-Received: from [176.228.60.248] (port=3419 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eyjX3-0006Kp-8w; Wed, 21 Mar 2018 15:36:21 -0400 In-reply-to: <20180321191903.GA38993@breton.holly.idiocy.org> (message from Alan Third on Wed, 21 Mar 2018 19:19:03 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:144505 Archived-At: > Date: Wed, 21 Mar 2018 19:19:03 +0000 > From: Alan Third > Cc: Aaron Jensen , 30800@debbugs.gnu.org > > The commit that introduced represented_frame was fixing some > flickering. What it seems to have done is move the updating of the > represented filename from being set synchronously to asynchronously. > The represented filename tells the WM which file is being edited so it > can show a matching icon in the titlebar and maybe some other stuff. > > It seems quite possible to me that the frame could be deleted in the > interim. > > Could we check that the frame is still live in sendEvent? > > if (represented_filename != nil && FRAME_LIVE_P (represented_frame)) I'd expect FRAME_LIVE_P to crash in the same way FRAME_NS_VIEW does, because FRAME_LIVE_P also dereferences the pointer, and the pointer appears to be garbage in this case (probably because its memory was free'd). > or just add > > if (represented_frame == f) > represented_frame = NULL; > > to x_destroy_frame as you say. If that fixes the problem, it's the safest change I can think of, so perhaps Aaron could try running Emacs 26.0.91 with it. > (I can’t help thinking it should be possible to update several frames > in quick succession but only have the last actually updated since > represented_filename and represented_frame are simply over‐written.) Yes, this machinery looks quite fragile to me. Is there any reason not to use selected_frame instead?