From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#43973: 28.0.50; [NS] Two crashes on macOS Date: Tue, 13 Oct 2020 20:09:46 +0100 Message-ID: <20201013190946.GK60347@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43973@debbugs.gnu.org To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 13 21:11:08 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSPhS-00019C-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 21:11:07 +0200 Original-Received: from localhost ([::1]:44620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSPhR-0007D9-TA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 15:11:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPgR-0006Sh-1A for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 15:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSPgQ-000647-Mu for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 15:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSPgQ-0000QK-HP for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 15:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2020 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43973 X-GNU-PR-Package: emacs Original-Received: via spool by 43973-submit@debbugs.gnu.org id=B43973.16026161981615 (code B ref 43973); Tue, 13 Oct 2020 19:10:02 +0000 Original-Received: (at 43973) by debbugs.gnu.org; 13 Oct 2020 19:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:48868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSPgM-0000Pz-IU for submit@debbugs.gnu.org; Tue, 13 Oct 2020 15:09:58 -0400 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]:33492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSPgK-0000Pj-Aq for 43973@debbugs.gnu.org; Tue, 13 Oct 2020 15:09:57 -0400 Original-Received: from smtpauth2.co-bxl (smtpauth2.co-bxl [10.2.0.24]) by wilbur.contactoffice.com (Postfix) with ESMTP id C2C6B135B; Tue, 13 Oct 2020 21:09:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1602616190; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=2237; bh=IaU4nJ448X/JnEfezL5Pa/h6NRVzivHQeck7MNP2j8A=; b=OtaoryVrXJB6pI+txfHimLGEW1SVES0aR17SixqVPJuxSISnifiS+ct14giSx1Ib RisLTPIuJvN0p16wNTEs1ef26f1m229Re3t4o8NHJ/RGR/uGAGvyTpU39fOF0tU0yb4 2irKWleSI+HBVZJPfsDIWTXig78yfj84wvRL6T3/fpvPYBTrZ1SJh5eb4oRCv9XWSjr UtPj7IGM2loJvN8KM5KjOM0D+cyq+WbA28MT6EmMZaavEw4ag6RPsgaZF4343RjHFkD Du6ENugnjF9ZW5R9zd5Vdce1+lwbMXg2ipLiMtkFzwmiGDQtGc10PD2FkL0qhxWPQBq ETl+wys5Eg== Original-Received: by smtp.mailfence.com with ESMTPA ; Tue, 13 Oct 2020 21:09:47 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id A8B502025F5A25; Tue, 13 Oct 2020 20:09:46 +0100 (BST) Mail-Followup-To: Alan Third , Andrii Kolomoiets , 43973@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190444 Archived-At: On Tue, Oct 13, 2020 at 10:35:28AM +0300, Andrii Kolomoiets wrote: > Update to recent trunk brought me everyone's favorite random crashes. > > In an attempt to find the recipe for reproduce the bug somehow, I spot > two crashes that I actually can reproduce in 'emacs -Q'. > > The first one is more "stable": > > With this code in scratch and point at '|': > > (make-frame `((parent-frame . ,(selected-frame)) > (width . 0.5) > (height . 0.5) > (top . 0.5) > (left . 0.5)))| > > 1. C-x C-e > 2. s-w > > Repeating these two steps 3-5 times leads to crash. Most of the time > the only meaningfull record in the 'bt' is: > > Thread 3 received signal SIGSEGV, Segmentation fault. > 0x00007fff6fa97678 in ?? () > (gdb) bt full > #0 0x00007fff6fa97678 in ?? () > No symbol table info available. > #1 0x0000000100476338 in -[EmacsImage dealloc] (self=0x1014c77f0, _cmd=0x7fff7afcdc58) at nsimage.m:286 > No locals. > > It may be tool bar related, because Emacs is not crashing with > tool-bar-mode turned of. This is almost definitely the result of some image being released twice. We've had a few crash reports where this has happened in the past, but never actually managed to work out what's causing it. I can't replicate the crash, fwiw. > The second one is not reproducible every time: > > 1. M-x tool-bar-mode > 2. Evaluate > (let ((params `((parent-frame . ,(selected-frame)) > (undecorated . t)))) > (dotimes (_z 100) > (set-face-background 'internal-border "black" > (make-frame params)))) > 3. Move the frame I can replicate this one, every time. I'm not sure exactly what's going on, but it's resulting in face == NULL, so modified src/nsterm.m @@ -3048,6 +3048,9 @@ so some key presses (TAB) are swallowed by the system. */ if (!face) face = FRAME_DEFAULT_FACE (f); + if (!face) + return; + ns_focus (f, &frame_rect, 1); [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f) set]; for (int i = 0; i < 4 ; i++) "fixes" it, but leaves Emacs in a bit of a strange state where I can only see one frame and it's incredibly slow. I suspect Emacs thinks there are 101 frames open but for whatever reason the OS hasn't opened them... -- Alan Third