From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#23462: 25.0.93; Crash on OS X when suspending main frame Date: Wed, 11 May 2016 23:28:24 +0100 Message-ID: <20160511222824.GA51118@breton.holly.idiocy.org> References: <82D6EB3D-6383-430B-BBC9-DEC216F0C33A@polito.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1463005761 6659 80.91.229.3 (11 May 2016 22:29:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 May 2016 22:29:21 +0000 (UTC) Cc: 23462@debbugs.gnu.org, Ivan Cibrario Bertolotti To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 12 00:29:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b0ccw-0006AJ-CJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 May 2016 00:29:10 +0200 Original-Received: from localhost ([::1]:54426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0ccv-0003ws-Hz for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2016 18:29:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0ccs-0003tx-18 for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 18:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0cco-0007AK-Ma for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 18:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0cco-0007AF-JA for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 18:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b0cco-0000Ht-3b for bug-gnu-emacs@gnu.org; Wed, 11 May 2016 18:29: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: Wed, 11 May 2016 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23462-submit@debbugs.gnu.org id=B23462.14630057151071 (code B ref 23462); Wed, 11 May 2016 22:29:02 +0000 Original-Received: (at 23462) by debbugs.gnu.org; 11 May 2016 22:28:35 +0000 Original-Received: from localhost ([127.0.0.1]:47787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0ccN-0000HD-Kt for submit@debbugs.gnu.org; Wed, 11 May 2016 18:28:35 -0400 Original-Received: from mail-wm0-f54.google.com ([74.125.82.54]:37749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0ccM-0000H1-5n for 23462@debbugs.gnu.org; Wed, 11 May 2016 18:28:34 -0400 Original-Received: by mail-wm0-f54.google.com with SMTP id a17so106274658wme.0 for <23462@debbugs.gnu.org>; Wed, 11 May 2016 15:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3IAhOR8CyfNshYBDAvZq8MKTWFOlgPq3jNz/gLcmeQ4=; b=gbFJMwz645roU4op02Uhu+dEzN/kpdAtoVBPOOsYDZ/FNdmT4gYYIuSN1LI07UddXs c/iZkf3QBZVqupE4K97UuqtPbwKVpxQPtyq/MjS8FUx8qQxXpQiOxBBeEo9qVEeRQhVq Hw3+VhrdLA6tcpNES1YUe1NF7sHP1uF+lD8B1yoJ7MnUgD4C/vTn8FHf2MMxLlrKtXeJ YFh9Mqb+UXS0fRujcYrCQLBhiSPSggFjNzHK24CIf6/gd+S8N0lV47gFjNLj07nvKwSu DTZokcD9SN3SMwLyW4Kveaq5Fx1GVOssQt8FWwpZBN0i3aaJJHxVYd7cBxQQafhy1wCK 2vpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3IAhOR8CyfNshYBDAvZq8MKTWFOlgPq3jNz/gLcmeQ4=; b=m0+JEuQK/8EG2svUxwTmv0bp16yr9oI/TgwG+Z8MLgw4l4sy3v6uyzFuHgZ2vmTP2s fUGfiYmCp8DWou14XOeLBHswYOnZChiSr9KoYxHEfKqvzXSmZmKTKveu3OKcqFdtyQGm B9TH9wC5nhGudYF4jTlHtjynQAVeA2kfCpXSvsqnYz2HXSe0Eh8tkQ5CKjJuBk92S4M7 KNceySqSQ7rZZH7fhvm2jD5C+w9WvOPTZGtSRBotw45EBwYZX1A3nx2+0Qr9uNWh7TSp y6SyfCNP3EGyOGwXY4d+WXI6/FDzfxsFIV2lKDFsU8y0iXuuge5KgjzOvrr12d9cA2I8 I3OQ== X-Gm-Message-State: AOPr4FWoqbfbELJoW9Q0t/FZtbTZDKd0DQAvOgxf66AXNWxiNSKvSu4IkMNeqxwkWorEsA== X-Received: by 10.194.206.39 with SMTP id ll7mr6033021wjc.179.1463005708215; Wed, 11 May 2016 15:28:28 -0700 (PDT) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-8511-d3bf-ccca-87ab.holly.idiocy.org. [2001:8b0:3f8:8129:8511:d3bf:ccca:87ab]) by smtp.gmail.com with ESMTPSA id m14sm10612396wmc.4.2016.05.11.15.28.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 May 2016 15:28:27 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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:118146 Archived-At: On Tue, May 10, 2016 at 11:57:47PM +0200, Anders Lindgren wrote: > > As far as I can tell, I don't see a better location to place the test. (I > have to include myself in the group who have no idea why drawRect is being > called when the frame is miniatured.) I would suggest that we add it as you > originally suggested. > > Alan, what do you say? Have you looked into this? Right, on a hunch that it's something to do with Emacs receiving and processing signals or input of some sort during or immediately after minimization, I tried wrapping [[view window] miniaturize: NSApp]; in x_iconify_frame with block_input and unblock_input: block_input(); [[view window] miniaturize: NSApp]; unblock_input(); which seems to have solved the crash. I'm not super-happy with this as the error message implies that something is being created in Objective C, then either clobbered or released elsewhere, *then* Objective C tries to release it automatically and it's already clobbered/gone. But I can't trace it back to find out what's actually going on. It appears to be related to unblock_input forcing the processing of "pending" signals or input when drawRect runs, but why is that breaking Objective C's garbage collection routines? I guess it probably doesn't matter, as long as it works. -- Alan Third